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

Escape analysis



Dear Soot gurus,

I'm interested in doing a simple analysis of Jimple bodies for escape
analysis. Specifically, for each "new" statement in a method body,
I'd like to determine if any of the following is true of the newly
created object:

  - it can be assigned to any field (static or instance)
  - it can be assigned to an element of an array
  - it can be passed as a parameter to any method
  - it can be returned or thrown
  - the "new" statement is possibly within some execution loop (*)

(*) optional but would be nice to know

The point of this is to determine if the new object can be allocated
on the stack, i.e., when the method returns (normally or otherwise)
the object is proven to be no longer reachable.

I'm looking for a basic, high level description of the most appropriate
way to do this, e.g., which Soot tools to use, and maybe some example
code to look at performing some similar task.

Thanks for any suggestions,
-Archie

__________________________________________________________________________
Archie Cobbs      *        CTO, Awarix        *      http://www.awarix.com