-
-
Notifications
You must be signed in to change notification settings - Fork 719
Using Soot and TamiFlex to analyze DaCapo
To analyze DaCapo benchmarks with Soot, first download the following:
- DaCapo JAR file
- TamiFlex: poa.jar, and pia.jar, but only if you want to statically transform DaCapo code and then measure the runtime of this code soot-2.5.0.jar (or higher) for Soot
After downloading the JAR files, your setup should look roughly like follows:
$ls -1
dacapo-9.12-bach.jar
pia-x.y.z.jar
poa-x.y.z.jar
soot-2.5.0.jar
ext we use the Play-Out Agent to dump for each of the DaCapo benchmark configurations all class files that the JVM loads when executing this configuration and a reflection trace file that contains information about reflective calls.
Let us first consider a single run on dacapo, on avrora-small. Normally, we run avrora simply by stating java -jar dacapo-9.12-bach.jar avrora -s small. To activate the Play-Out Agent, we instead use the following command:
java -javaagent:poa-x.y.z.jar -jar dacapo-9.12-bach.jar avrora -s small
===== DaCapo 9.12 avrora starting =====
===== DaCapo 9.12 avrora PASSED in 5065 msec =====
=============================================
TamiFlex Play-Out Agent Version 1.0
Found 36 new log entries.
The part -javaagent:poa-x.y.z.jar instructs the VM to use the Play-Out Agent. Note the additional output Found 36 new entries.... The agent reports that it found 36 new entries for the reflection-log file.
You can inspect the log file (And dumped class files) if you want:
$ ls out
avrora cck Harness.class java org refl.log sun
$ head out//refl.log
Class.forName;avrora.Main;org.dacapo.harness.Avrora.<init>;26;
Class.forName;java.security.MessageDigestSpi;java.security.Security.getSpiClass;640;
Class.forName;java.util.CurrencyData;java.util.Currency$1.run;128
...
As you can see, by default, the agent dumps its log file and class files into the out directory. The directory can be modified using a ConfigurationFile.
NOTE: The Play-Out Agent requires additional heap space. We therefore advise you to provide the JVM with additional space using the -Xmx flag.
For your convenience, we provide a script that allows you to dump class files and reflection traces for all dacapo benchmarks and all input sizes. (You will also need the settings script.) Those scripts will only work with TamiFlex versions smaller than 2.0.
We next want to use Soot to analyze (and potentially transform) the dumped class files, constructing a call graph based on the information from the reflection trace file.
To apply Soot to avrora-small, we can use the following command:
java -Xmx10G -cp soot-2.5.0.jar soot.Main -w -app -p cg.spark enabled -p cg refelction-log:out/refl.log -cp JAVA_HOME/lib/rt.jar:JAVA_HOME/lib/jce.jar:out -include org.apache. -include org.w3c. -main-class Harness -d sootified/avrora-small Harness
TODO This command is not working? Ask
Also check out Soot's webpage.
NOTE: If you find any bugs in those tutorials (or other parts of Soot) please help us out by reporting them in our issue tracker.
- Home
- Getting Help
- Tutorials
- Reference Material
- General Notions
- Getting Started
- A Few Uses of Soot
- Using Soot as a Command-Line Tool
- Using the Soot Eclipse Plugin
- Using Soot as a Compiler Framework
- Building Soot
- Coding Conventions
- Contributing to Soot
- Updating the Soot Web Page
- Reporting Bugs
- Preparing a New Soot Release