[Soot-list] large memory consumption

Steven Arzt Steven.Arzt at cased.de
Tue Oct 28 05:26:25 EDT 2014


Hi Fang,

 

There should not be any functional difference. The CombinedDUAnalysis
computes uses and definitions at the same time, whereas the two distinct
analyses do it separately. The CombinedDUAnalysis is however not very
optimized which makes it considerably slower and consume a lot more memory
Thus, the difference is indeed in the implementation details.

 

Theoretically, a combined analysis should be faster if done right - which is
apparently not the case here as I had to find out to my cost a couple of
months ago as well ^^

 

Best regards,

  Steven

 

Von: Fang Liu [mailto:fbeyond.liu at gmail.com] 
Gesendet: Montag, 27. Oktober 2014 21:44
An: Steven Arzt
Cc: soot-list at cs.mcgill.ca
Betreff: Re: [Soot-list] large memory consumption

 

Hi, Steven,

 I am just wondering what's the difference of these two approach, except for
the performance. 

They are have the getuseof() method? Is there any difference of the return
of this method?

 

Thank you.

 

Best,

Fang

 

On Mon, Oct 27, 2014 at 12:41 PM, Steven Arzt <Steven.Arzt at cased.de> wrote:

Hi Fang,

 

The CombinedDUAnalysis is rather inefficient. If you run into issues, please
use the two separate analyses for Definitions (SmartLocalDefs) and Uses
(SimpleLocalUses).

 

Best regards,

  Steven

 

Von: soot-list-bounces at CS.McGill.CA [mailto:soot-list-bounces at CS.McGill.CA]
Im Auftrag von Fang Liu
Gesendet: Montag, 27. Oktober 2014 16:17
An: soot-list at CS.McGill.CA
Betreff: [Soot-list] large memory consumption

 

Hi, All,

I am using soot to do flow analysis. The program consumes lots of memory
(2GB) when processing a 100KB class with  CombinedDuAnalysis.v(unitgraph).  

 

Does anyone know what combineDuAnalysis do in detail? Why it sometimes
consumes so much memory?

 

Below is the errors when the heapsize is 1GB.

 

Thank you.

 

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space

        at
soot.toolkits.scalar.ArraySparseSet.doubleCapacity(ArraySparseSet.java:120)

        at soot.toolkits.scalar.ArraySparseSet.copy(ArraySparseSet.java:274)

        at
soot.toolkits.scalar.CombinedDUAnalysis.copy(CombinedDUAnalysis.java:261)

        at
soot.toolkits.scalar.BackwardFlowAnalysis.doAnalysis(BackwardFlowAnalysis.ja
va:129)

        at
soot.toolkits.scalar.CombinedDUAnalysis.<init>(CombinedDUAnalysis.java:163)

        at
soot.toolkits.scalar.CombinedDUAnalysis.v(CombinedDUAnalysis.java:99)

      

 

 

 

Best,

Fang





 

-- 

Fang Liu
Ph.D Student
Dept of Computer Science, Virginia Tech
Blacksburg VA 24060
 <mailto:fbeyond at cs.vt.edu> fbeyond at cs.vt.edu 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20141028/f1160419/attachment.html 


More information about the Soot-list mailing list