[Soot-list] Large program call graph analysis

Marc-André Laverdière marc-andre.laverdiere-papineau at polymtl.ca
Thu Sep 25 22:11:57 EDT 2014


Hi Daniel,

Even though Soot 2.5.0 should work, there's been so many changes and
improvements since then that I encourage you to use the nightly build:
https://ssebuild.cased.de/nightly/soot/

Back to your question, it would've been good that you paste the full
exception. That exception gets thrown when trying to compile Java code,
so that makes me guess two things:

1) IIRC, there can be problems when .java and .class files are in the
same folder/jar file. If that is the case, then you really need to have
a nightly build - we had a fix for that merged really recently.

2) Is Hadoop's source on Java 7 by any chance? Java 7 support was added
last year (roughly), so 2.5.0 doesn't have it.

3) Are you sure you really provided all the jars that you could? IIRC,
the Java front-end doesn't benefit from the phantom-refs option. Working
from bytecode is a much better option when you deal with large programs.

P.S. I've dealt with Java EE call graph bloat, so let me know if phantom
refs aren't enough to make your analysis scale.

Marc-André Laverdière-Papineau
Doctorant - PhD Candidate

On 09/25/2014 06:04 PM, Daniel Dean wrote:
> Hi,
> 
> I'm interested in using soot to extract and analyze the call graph for
> relatively large programs (e.g., Hadoop). I've followed the tutorials
> and have gotten soot working for small programs but I've run into
> problems when trying create the call graph for larger programs.
> Specifically, when trying to construct a call graph starting at the
> NameNode entry point, I'm getting a soot.CompilationDeathException. I
> think its because my soot classpath is not set correctly. The command
> I'm using is:
> 
> java -jar soot-2.5.0.jar -main-class NameNode -w -cp
> /home/daniel/Desktop/HadoopSource/hadoop-2.0.0-alpha-src/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode
> -d SootOutput -allow-phantom-refs NameNode
> 
> What isn't clear to me is if I don't set the classpath to exactly that
> directory, soot reports that it cannot find the NameNode class. For
> example, a classpath of "..hadoop/hdfs/server/" does not work. I
> believe the soot.CompilationDeathException is a result of the some
> missing files in other directories not being included in the
> classpath. Is the solution to manually add each directory with any
> .java/.class files to the classpath? Is there any way I can specify a
> top level directory and have soot also check any subdirectories for
> .java/.class files as well?
> 
> I apologize if this has a trivial solution, but I've been stuck on
> this for a few days now and nothing I try seems to help. Any help at
> all, or where I can look for help, would be greatly appreciated. I can
> also provide more details if needed.
> 
> Best,
> Daniel
> _______________________________________________
> Soot-list mailing list
> Soot-list at CS.McGill.CA
> https://mailman.CS.McGill.CA/mailman/listinfo/soot-list
> 


More information about the Soot-list mailing list