[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What exactly does the -W flag do?



Hi,

This is in fact correct. When you turn on the -W flag, Soot does
whole-program optimizations (such as method inlining). To do this, Soot
needs to know about everything in the libraries, so it has to start
analyzing both the application and library classes. This is why memory
usage blows up. As Fabien says, to avoid getting the OutOfMemoryError,
allocate more memory to the JVM by doing

java -mx300m soot.Main ...

to give Soot 300 Mb of memory, etc.

Hope this helps.


Regards,
Felix 

On Thu, 21 Jun 2001, Mark D. Butala wrote:

> Hi,
> 
> What exactly is involved when the user specifies the -W flag?  For me,
> after doing so and invoking SOOT on some simple code, the amount of memory
> it consumes sky rockets to the point where the JVM returns
> java.lang.OutOfMemoryError (top reports that it consumes more than about
> 80 Mb and then dies).
> 
> Thinking that this could be a problem with a transforms/optimizations done
> in the whole program phase, I turned them all off with the following flags
> to SOOT:
> 
> -p wjop.smb disabled -p wjop.si disabled -p wjtp2.ra disabled
> 
> Still, the amount of memory SOOT consumes sky rockets.  What further
> analysis is done when the -W flag is set?
> 
> Keep in mind that this does not happen for all programs.  Code which does
> not import any packages run through SOOT with -W perfectly, while those
> that do import packages blow up in terms of memory usage.  Could this mean
> that a call graph is being generated for the whole application and all
> packages...causing the memory explosion?  Something else?
> 
> Thanks in advance!
> 
> ---------------------
> Vincit omnia veritas.
> Sapere audi.
> 
> Mark D. Butala
>