[Soot-list] Where does the memory go? - SmartLocalDefs

Marc-André Laverdière marc-andre.laverdiere-papineau at polymtl.ca
Mon Aug 5 15:29:43 EDT 2013


Hi everybody,

I have been plagued with high memory usage lately, and so I decided to
investigate what is going on with the good old VisualVM profiler.

Running an enhanced Flowdroid analysis, this is what I'm getting (sorted
in terms of memory usage). Note that it records allocations, not actual
usage. It may be that those will be garbage collected fast and leave no
prints behind.

If someone has done a better analysis of the memory used in Soot, I'd
like to have a look at it.


#1 HashMap.Entry and Entry[] (167 MiB - 74.3M allocations) - a lot due
to SmartLocalDefs, and a bit due to PhaseOptions, and a bit due to
ExceptionalUnitGraph
#2 char[] (64 Mib - 15.7M allocations) - due to Strings, StringBuilder
operations, and PrintWriter use
#3 Object[] (~60 MiB - 1.4M allocations) - mostly from ArrayList[]
created in getUseBoxes and in UnitGraph and - SmarLocalDefs
#4 HashMap$KeyIterator (35.5 MiB - 17M allocations) mostly from
FastHierarchy, ThrowableSet, ForwardFlowAnalysis and AbstractFlowAnalysis
#5 HashMap (20 Mib - 366K allocations) - SmartLocalDefs again.

I understand that my small test is probably not representative. But it
looks like that SmartLocalDefs needs some serious tweaking.

I wanted to know if anybody spent time looking a different data
structures before settling on the HashSets and if it is the best tool
for the job.

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


More information about the Soot-list mailing list