% tar xvzf /nobackup/localhost/dufour/downloads/starj-0.1-beta8.tar.gz % cd starj-0.1-beta8 % export JAVA_HOME=/prolangs/software/sun-jdk-x86-1.4.2.11 % cd agent/ % make (Warnings, if any, can be ignored) % cd .. % cat > AllYourBase.java public class AllYourBase { public static void main(String[] args) { System.our.println("All your base are belong to us!"); } } ^D % javac AllYourBase.java % export CLASSPATH=$PWD:$PWD/analyzer/lib/starj.jar:$JAVA_HOME/jre/lib/rt.jar % export LD_LIBRARY_PATH=$PWD/agent/lib % cd spec % cp ~/courses/516/p2/dyncg.sj . % java starj.spec.Compiler dyncg.sj *J> Parsing file: 'dyncg.sj' *J> Parsing successful *J> Writing output to: 'dyncg.spec' *J> Compilation successful % cd .. % java -Xint -Xrunsj:specfile=spec/dyncg.spec,cp=$CLASSPATH,gzip=true,file=allyourbase.trace AllYourBase *J Warning> Optimize mode will be turned off due to requested fields *J Agent> Initialization completed All your base are belong to us! *J Agent> Completed program execution % file allyourbase.trace allyourbase.trace: gzip compressed data, from Unix % java starj.Main --help Usage: java starj.Main [options] [trace file] *J: A Tool for Dynamic Analysis of Java Programs IO options: -x , --xml Defines a set of metric elements to collect XML output from -b , --buffer-size Sets trace buffer --dep-graph Outputs dependency graph -m , --text Defines a set of metric elements to collect text metric output from General options: -h, --help Print helps and exits -v, --version Prints version and exits -p , Sets pack/operation options --config -cp , -classpath Sets the class path , --classpath --element-help Displays element-specific help -H, --show-hierarchy Displays pack/operation hierarchy % java starj.Main -H + initial + toolkits + services o IDResolver o CallStackManager o InstructionResolver o CallSiteResolver o PropagationManager + (metrics) o counts o array o base o fp o ptr o mem o poly o size o sync + (aspects) o AspectTagResolver o (tagprn) o (aprn) o metrics + printers o (instprn) o (evprn) o (extprn) o (class) o (contention) o (cg) + final % java starj.Main --element-help toolkits.printers.class Operation 'class': ------------------ Outputs information regarding loaded classes Configuration Description ------------- ----------- enabled Configures whether this element is enabled or not file Sets the name of a file to use as output % java starj.Main -p toolkits.printers.class enabled,file:allyourbase.loaded_classes allyourbase.trace *J Warning> Unknown trace attribute: 'starj.bytecode.tags' *J> Collecting event dependencies *J> Disabling: InstructionResolver (Dependency on event 36 cannot be satisfied) *J> Disabling: CallSiteResolver (Dependency on event 36 cannot be satisfied) *J> Collecting operation dependencies *J> Disabling: PropagationManager (missing dependency: CallSiteResolver) *J> Disabling unnecessary service: CallStackManager *J> Disabling unnecessary service: IDResolver *J> Pruning operation lists *J> Flattening hierarchy *J> Initializing operations *J> Processing trace ... *J> 14754 events processed in 00h00m00.167s *J> Finalizing *J> Processing completed successfully