diff --git a/build.xml b/build.xml index d7da88615be158e851ddefc855801aa9afbd71d3..84fadebbdf56a97cd8b483ec326a0ae9d375bfd6 100644 --- a/build.xml +++ b/build.xml @@ -70,6 +70,7 @@ <classpath> <fileset dir="dist/lib/"> <include name="**/*.jar" /> + <exclude name="**/spass-meter-ant.jar" /> </fileset> </classpath> </manifestclasspath> diff --git a/frameworks/SPASSmeter/Benchmark (SPASSmeter) - TCP client.launch b/frameworks/SPASSmeter/Benchmark (SPASSmeter) - TCP client.launch new file mode 100644 index 0000000000000000000000000000000000000000..04790b78a9d060a01e2ebfddb5099cde5754c10f --- /dev/null +++ b/frameworks/SPASSmeter/Benchmark (SPASSmeter) - TCP client.launch @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication"> +<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> +<listEntry value="/MooBench/src/mooBench/benchmark/Benchmark.java"/> +</listAttribute> +<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> +<listEntry value="1"/> +</listAttribute> +<listAttribute key="org.eclipse.jdt.launching.CLASSPATH"> +<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7" path="1" type="4"/> "/> +<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento exportedEntriesOnly="false" project="MooBench"/> </runtimeClasspathEntry> "/> +<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/MooBench/frameworks/SPASSmeter/lib/win/spass-meter-boot.jar" path="3" type="2"/> "/> +<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/MooBench/frameworks/SPASSmeter/lib/win/spass-meter-ia.jar" path="3" type="2"/> "/> +<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/MooBench/frameworks/SPASSmeter/lib/win/spass-meter-rt-mod.jar" path="3" type="2"/> "/> +</listAttribute> +<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/> +<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/> +<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="mooBench.benchmark.Benchmark"/> +<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-d 10 -h 1 -m 0 -t 1000 -o tmp/test.txt -q --application mooBench.monitoredApplication.MonitoredClassSimple"/> +<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="MooBench"/> +<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-javaagent:frameworks/SPASSmeter/lib/win/spass-meter-ia.jar=xmlconfig=frameworks/SPASSmeter/lib/config.xml,out=tmp/program.log,logLevel=ALL,debuglog=tmp/debug.log,tcp=localhost:6002"/> +</launchConfiguration> diff --git a/frameworks/SPASSmeter/Benchmark (SPASSmeter) - TCP server.launch b/frameworks/SPASSmeter/Benchmark (SPASSmeter) - TCP server.launch new file mode 100644 index 0000000000000000000000000000000000000000..fdfa246e4bed0cb3b1cc57bf331e8a696d6ed51a --- /dev/null +++ b/frameworks/SPASSmeter/Benchmark (SPASSmeter) - TCP server.launch @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication"> +<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> +<listEntry value="/MooBench"/> +</listAttribute> +<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> +<listEntry value="4"/> +</listAttribute> +<listAttribute key="org.eclipse.jdt.launching.CLASSPATH"> +<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7" path="1" type="4"/> "/> +<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento exportedEntriesOnly="false" project="MooBench"/> </runtimeClasspathEntry> "/> +<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/MooBench/frameworks/SPASSmeter/lib/win/spass-meter-ant.jar" path="3" type="2"/> "/> +</listAttribute> +<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/> +<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/> +<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="de.uni_hildesheim.sse.monitoring.runtime.recordingServer.TCPRecordingServer"/> +<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="baseDir=. port=6002"/> +<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="MooBench"/> +</launchConfiguration> diff --git a/frameworks/SPASSmeter/benchmark-tcp.sh b/frameworks/SPASSmeter/benchmark-tcp.sh new file mode 100644 index 0000000000000000000000000000000000000000..2f8b72f59e5335317f35edeb6382788a4d9e720f --- /dev/null +++ b/frameworks/SPASSmeter/benchmark-tcp.sh @@ -0,0 +1,141 @@ +#!/bin/bash +# This file is configured for linux instead of solaris!!! + +JAVABIN="" + +RSCRIPTDIR=r/ +BASEDIR=./ +RESULTSDIR="${BASEDIR}tmp/results-spassmeter/" + +SLEEPTIME=30 ## 30 +NUM_LOOPS=10 ## 10 +THREADS=1 ## 1 +RECURSIONDEPTH=10 ## 10 +TOTALCALLS=2000000 ## 2000000 +METHODTIME=0 ## 500000 + +#MOREPARAMS="--quickstart" +MOREPARAMS="--application mooBench.monitoredApplication.MonitoredClassSimple ${MOREPARAMS}" + +TIME=`expr ${METHODTIME} \* ${TOTALCALLS} / 1000000000 \* 4 \* ${RECURSIONDEPTH} \* ${NUM_LOOPS} + ${SLEEPTIME} \* 4 \* ${NUM_LOOPS} \* ${RECURSIONDEPTH} + 50 \* ${TOTALCALLS} / 1000000000 \* 4 \* ${RECURSIONDEPTH} \* ${NUM_LOOPS} ` +echo "Experiment will take circa ${TIME} seconds." + +echo "Removing and recreating '$RESULTSDIR'" +(rm -rf ${RESULTSDIR}) && mkdir ${RESULTSDIR} +#mkdir ${RESULTSDIR}stat/ + +# Clear spassmeter.log and initialize logging +rm -f ${BASEDIR}spassmeter.log +touch ${BASEDIR}spassmeter.log + +RAWFN="${RESULTSDIR}raw" + +JAVAARGS="-server" +JAVAARGS="${JAVAARGS} -d64" +JAVAARGS="${JAVAARGS} -Xms1G -Xmx4G" +JAVAARGS="${JAVAARGS} -verbose:gc -XX:+PrintCompilation" +#JAVAARGS="${JAVAARGS} -XX:+PrintInlining" +#JAVAARGS="${JAVAARGS} -XX:+UnlockDiagnosticVMOptions -XX:+LogCompilation" +#JAVAARGS="${JAVAARGS} -Djava.compiler=NONE" +JAR="-jar MooBench.jar" + +JAVAARGS_NOINSTR="${JAVAARGS}" +JAVAARGS_LTW="${JAVAARGS} -javaagent:${BASEDIR}lib/linux/spass-meter-ia.jar=xmlconfig=${BASEDIR}lib/config.xml,out=${RESULTSDIR}spassmeter.txt,tcp=localhost:6002" +JAVAARGS_LTW_ASM="${JAVAARGS_LTW} -Dspass-meter.iFactory=de.uni_hildesheim.sse.monitoring.runtime.instrumentation.asmTree.Factory" + +SERVER="${JAVAARGS} -classpath ${BASEDIR}lib/linux/spass-meter-ant.jar de.uni_hildesheim.sse.monitoring.runtime.recordingServer.TCPRecordingServer baseDir=. port=6002" + +## Write configuration +uname -a >${RESULTSDIR}configuration.txt +${JAVABIN}java ${JAVAARGS} -version 2>>${RESULTSDIR}configuration.txt +echo "JAVAARGS: ${JAVAARGS}" >>${RESULTSDIR}configuration.txt +echo "" >>${RESULTSDIR}configuration.txt +echo "Runtime: circa ${TIME} seconds" >>${RESULTSDIR}configuration.txt +echo "" >>${RESULTSDIR}configuration.txt +echo "SLEEPTIME=${SLEEPTIME}" >>${RESULTSDIR}configuration.txt +echo "NUM_LOOPS=${NUM_LOOPS}" >>${RESULTSDIR}configuration.txt +echo "TOTALCALLS=${TOTALCALLS}" >>${RESULTSDIR}configuration.txt +echo "METHODTIME=${METHODTIME}" >>${RESULTSDIR}configuration.txt +echo "THREADS=${THREADS}" >>${RESULTSDIR}configuration.txt +echo "RECURSIONDEPTH=${RECURSIONDEPTH}" >>${RESULTSDIR}configuration.txt +sync + +## Execute Benchmark +for ((i=1;i<=${NUM_LOOPS};i+=1)); do + j=${RECURSIONDEPTH} + k=0 + echo "## Starting iteration ${i}/${NUM_LOOPS}" + echo "## Starting iteration ${i}/${NUM_LOOPS}" >>${BASEDIR}spassmeter.log + + # No instrumentation + k=`expr ${k} + 1` + echo " # ${i}.${j}.${k} No instrumentation" + echo " # ${i}.${j}.${k} No instrumentation" >>${BASEDIR}spassmeter.log + #sar -o ${RESULTSDIR}stat/sar-${i}-${j}-${k}.data 5 2000 1>/dev/null 2>&1 & + ${JAVABIN}java ${JAVAARGS_NOINSTR} ${JAR} \ + --output-filename ${RAWFN}-${i}-${j}-${k}.csv \ + --totalcalls ${TOTALCALLS} \ + --methodtime ${METHODTIME} \ + --totalthreads ${THREADS} \ + --recursiondepth ${j} \ + ${MOREPARAMS} + #kill %sar + [ -f ${BASEDIR}hotspot.log ] && mv ${BASEDIR}hotspot.log ${RESULTSDIR}hotspot-${i}-${j}-${k}.log + echo >>${BASEDIR}spassmeter.log + echo >>${BASEDIR}spassmeter.log + sync + sleep ${SLEEPTIME} + + # SPASSmeter Javassist + k=`expr ${k} + 1` + echo " # ${i}.${j}.${k} SPASSmeter Javassist" + echo " # ${i}.${j}.${k} SPASSmeter Javassist" >>${BASEDIR}spassmeter.log + #sar -o ${RESULTSDIR}stat/sar-${i}-${j}-${k}.data 5 2000 1>/dev/null 2>&1 & + ${JAVABIN}java ${SERVER} 1>>server.out 2>&1 & + ${JAVABIN}java ${JAVAARGS_LTW} ${JAR} \ + --output-filename ${RAWFN}-${i}-${j}-${k}.csv \ + --totalcalls ${TOTALCALLS} \ + --methodtime ${METHODTIME} \ + --totalthreads ${THREADS} \ + --recursiondepth ${j} \ + ${MOREPARAMS} + #kill %sar + [ -f ${BASEDIR}hotspot.log ] && mv ${BASEDIR}hotspot.log ${RESULTSDIR}hotspot-${i}-${j}-${k}.log + echo >>${BASEDIR}spassmeter.log + echo >>${BASEDIR}spassmeter.log + sync + sleep ${SLEEPTIME} + + # SPASSmeter ASM + k=`expr ${k} + 1` + echo " # ${i}.${j}.${k} SPASSmeter ASM" + echo " # ${i}.${j}.${k} SPASSmeter ASM" >>${BASEDIR}spassmeter.log + #sar -o ${RESULTSDIR}stat/sar-${i}-${j}-${k}.data 5 2000 1>/dev/null 2>&1 & + ${JAVABIN}java ${SERVER} 1>>server.out 2>&1 & + ${JAVABIN}java ${JAVAARGS_LTW_ASM} ${JAR} \ + --output-filename ${RAWFN}-${i}-${j}-${k}.csv \ + --totalcalls ${TOTALCALLS} \ + --methodtime ${METHODTIME} \ + --totalthreads ${THREADS} \ + --recursiondepth ${j} \ + ${MOREPARAMS} + #kill %sar + [ -f ${BASEDIR}hotspot.log ] && mv ${BASEDIR}hotspot.log ${RESULTSDIR}hotspot-${i}-${j}-${k}.log + echo >>${BASEDIR}spassmeter.log + echo >>${BASEDIR}spassmeter.log + sync + sleep ${SLEEPTIME} + +done +#zip -jqr ${RESULTSDIR}stat.zip ${RESULTSDIR}stat +#rm -rf ${RESULTSDIR}stat/ +mv ${BASEDIR}spassmeter.log ${RESULTSDIR}spassmeter.log +[ -f ${RESULTSDIR}hotspot-1-${RECURSIONDEPTH}-1.log ] && grep "<task " ${RESULTSDIR}hotspot-*.log >${RESULTSDIR}log.log +[ -f ${BASEDIR}errorlog.txt ] && mv ${BASEDIR}errorlog.txt ${RESULTSDIR} + +## Clean up raw results +#gzip -qr ${RESULTSDIR}results.zip ${RAWFN}* +#rm -f ${RAWFN}* +[ -f ${BASEDIR}nohup.out ] && cp ${BASEDIR}nohup.out ${RESULTSDIR} +[ -f ${BASEDIR}server.out ] && mv ${BASEDIR}server.out ${RESULTSDIR} +[ -f ${BASEDIR}nohup.out ] && > ${BASEDIR}nohup.out diff --git a/frameworks/SPASSmeter/lib/linux/spass-meter-ant.jar b/frameworks/SPASSmeter/lib/linux/spass-meter-ant.jar new file mode 100644 index 0000000000000000000000000000000000000000..7c1f727bf0f37cb9fc8b724d892f45536c250d88 Binary files /dev/null and b/frameworks/SPASSmeter/lib/linux/spass-meter-ant.jar differ diff --git a/frameworks/SPASSmeter/lib/linux/spass-meter-rt-mod.jar b/frameworks/SPASSmeter/lib/linux/spass-meter-rt-mod.jar new file mode 100644 index 0000000000000000000000000000000000000000..9c90361f0798d84376215f2193444ac051141bc4 Binary files /dev/null and b/frameworks/SPASSmeter/lib/linux/spass-meter-rt-mod.jar differ diff --git a/frameworks/SPASSmeter/lib/linux/spass-meter-rt.jar b/frameworks/SPASSmeter/lib/linux/spass-meter-rt.jar deleted file mode 100644 index 26b79a3067aa0a20b66e91e467f3eed6a2db629f..0000000000000000000000000000000000000000 Binary files a/frameworks/SPASSmeter/lib/linux/spass-meter-rt.jar and /dev/null differ diff --git a/frameworks/SPASSmeter/lib/win/spass-meter-ant.jar b/frameworks/SPASSmeter/lib/win/spass-meter-ant.jar new file mode 100644 index 0000000000000000000000000000000000000000..663afe0292e73e68caedef4a67147725f298eaeb Binary files /dev/null and b/frameworks/SPASSmeter/lib/win/spass-meter-ant.jar differ diff --git a/frameworks/SPASSmeter/lib/win/spass-meter-rt-mod.jar b/frameworks/SPASSmeter/lib/win/spass-meter-rt-mod.jar new file mode 100644 index 0000000000000000000000000000000000000000..a4aee236d16078d8d7853fc250546198d3b009b4 Binary files /dev/null and b/frameworks/SPASSmeter/lib/win/spass-meter-rt-mod.jar differ diff --git a/frameworks/SPASSmeter/lib/win/spass-meter-rt.jar b/frameworks/SPASSmeter/lib/win/spass-meter-rt.jar deleted file mode 100644 index 01ee4a1319eaeee0e0672def852684a114161dcb..0000000000000000000000000000000000000000 Binary files a/frameworks/SPASSmeter/lib/win/spass-meter-rt.jar and /dev/null differ