[Soot-list] Instrumenting JRE classes using Soot

Eric Bodden bodden at st.informatik.tu-darmstadt.de
Fri Jun 4 04:30:19 EDT 2010


Hi Sai.

> One issue is that it seems that TamiFlex could not transform about 30
> preloaded classes (in
> the absence of reflection). That might be problematic if users want to
> instrument the whole JDK
> (you can easily get instrumenting your instrumentation code, I am afraid).
> Technically, only
> Object, String, Class classes could not be modified in anyway.

As I wrote on the other list, I am not sure which classes exactly you
are talking about. It would probably be unsafe to modify these classes
anyway, no matter whether you do it online (with an agent) or offline.

> Btw, do you have some best practice in integrating Soot-based transformation
> code with the
> java instrumentation API? We have a code base of soot-based program
> transformation code, but
> for some reason, need to use that as load-time instrumentation code. Of
> course, we could use
> play-in / play-out agent of TamiFlex to do so.But I am wondering is there
> any better ways, e.g.
> is there any compatible API taking byte[] as input and produce byte[] as
> output.

I have thought about implementing this at some point but I have not
yet found the time. Of course this would be nice to have but Soot was
never set up to do such things. In particular, Soot usually wants to
resolve all dependencies of a class file and cannot really do anything
with just one class file on its own. Other tools are really better at
that.

Eric


More information about the Soot-list mailing list