[Soot-list] Buidling Partial Call Graph
Armand Navabi
anavabi at purdue.edu
Wed Jul 18 14:38:15 EDT 2007
I am building a call graph for a HelloWorld program. Just creating the
call graph takes about 20 minutes on my machine. I understand that the
call graph has many nodes (java.* and sun.*) and therefore takes a long
time to build. I was wondering if I could build a partial call graph,
so I read the soot mailing archives, and found the following post:
http://www.sable.mcgill.ca/listarchives/soot-list/msg01169.html
There is mention of building a partial call graph, but it looks like the
exact details were sent in a separate email that was not sent to the
soot mailing list. Anyone know how I might be able to build a partial
call graph. Here is how I am currently building the call graph.
public class MyTransformer extends SceneTransformer {
public static void main(String[] args) {
if(args.length == 0) System.exit(-1);
Scene.v().setSootClassPath(".:/usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/rt.jar:"
+
"/usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/jce.jar:" +
"/usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/jsse.jar");
PackManager.v().getPack("wjtp").
add(new Transform("wjtp.mytransform", MyTransformer.v()));
soot.Main.main(args);
}
protected void internalTransform (String phaseName, Map options) {
CallGraph cg = Scene.v().getCallGraph();
System.out.println("call graph: " + cg);
}
}
I run the program with the following command line arguments:
java -Xmx1024m analysis.getcallgraph.MyTransformer --app -p cg.spark
on-fly-cg:true -w analysis.examples.Hello
Thanks,
Armand
More information about the Soot-list
mailing list