[Soot-list] Performance problem (and fix?)

Eric Bodden eric.bodden at ec-spride.de
Wed Apr 3 12:22:14 EDT 2013


Hello.

Good question. I can't say why this was changed. I removed the line for now.

Eric

On 14 March 2013 21:02, Ismail Badawi <isbadawi at gmail.com> wrote:
> That code was brought over from abc
> (https://github.com/Sable/soot/commit/d10e3bc00bca1d59e90aa4d7ccc572f86befc529).
> I had a quick look through the abc history and the commit for that revision
> is just:
>
> r574 | ganesh | 2004-06-21 10:56:43 -0400 (Mon, 21 Jun 2004) | 2 lines
> Changed paths:
>    M /trunk/aop/abc/src/abc/soot/util/Validate.java
>    M /trunk/aop/abc/src/abc/weaving/matching/MethodCallShadowMatch.java
>
> work around soot bug
>
> Ismail
>
> On Thu, Mar 14, 2013 at 9:47 AM, Michael Pradel <michael at binaervarianz.de>
> wrote:
>>
>> Hi,
>>
>> I found a performance problem and a maybe-fix for it, which speeds up my
>> analysis by 5x. The problem is that the active hierarchy is repeatedly
>> computed when calling Scene.getActiveHierarchy(). The Scene caches the
>> hierarchy to avoid this redundant computation, but unfortunately Body
>> contains the following statement (line 701):
>>
>>         // FIXME: Work around for bug in soot
>>         Scene.v().releaseActiveHierarchy();
>>
>> I.e., the cached hierarchy is deleted for each Body that is validated
>> (I'm using the -validate option). Is this really necessary? The
>> hierarchy shouldn't change while validating method bodies. As far as I
>> can tell from running my own analyses, removing the statement doesn't
>> change the behavior (except for avoiding the redundant computation).
>>
>> Does anyone remember the reason for the FIXME (it's from October 2004)?
>> Can it be removed safely? Getting a 5x speedup with such a simple change
>> would be great.
>>
>> Thanks,
>> Michael
>> _______________________________________________
>> Soot-list mailing list
>> Soot-list at sable.mcgill.ca
>> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
>
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>



-- 
Eric Bodden, Ph.D., http://sse.ec-spride.de/ http://bodden.de/
Head of Secure Software Engineering Group at EC SPRIDE
Tel: +49 6151 16-75422    Fax: +49 6151 16-72051
Room 3.2.14, Mornewegstr. 30, 64293 Darmstadt


More information about the Soot-list mailing list