[Soot-list] instrumenting with soot class by class
Chris Pickett
chris.pickett at mail.mcgill.ca
Wed Apr 16 22:43:18 EDT 2008
Hi David,
Maybe you could look at ASM.
http://asm.objectweb.org/
Cheers,
Chris
David Vollmar wrote:
> Hi Eric!
> Thanks for the quick reply!
> I need to instrument almost every jimple instruction and I was assuming
> AspectJ only allows instrumentation around method entry and exit points.
> Am I mistaken about that?
>
> The problem with the current approach that soot is taking is that for a
> large codebase the instrumentation takes really long since there does
> not seem to be a built in mechanism that would allow for soot to detect
> that a class is already instrumented.
> I was also considering whether it would be possible to change the
> behavior of 'internalTransform' method so that I can bail out of that
> method in case
> I do not need to instrument the class again. Unfortunately, if I just
> return out of the internalTransform method without changing the byte
> code, soot overwrites the
> previously instrumented class with an un-instrumented version of the class.
>
> Do you think it would be possible (even for me) to modify the core soot
> code to allow for that kind of behavior?
>
> Thanks
>
> David
>
> Another
> On Apr 16, 2008, at 8:17 PM, Eric Bodden wrote:
>> Hi, David.
>>
>> I have not heard of anybody ever trying this. My guess would be that
>> this is hard to do. Soot attempts to resolve types as it converts a
>> given class file into Jimple. This implies other, referenced, classes
>> to be loaded, which in turn might give you some trouble.
>>
>> Probably the easiest tool for this kind of stuff would be AspectJ with
>> its built-in load time weaver. Did you consider using that? Or is it
>> too limited for you?
>>
>> Eric
>>
>> On 16/04/2008, David Vollmar <kavika at the-dave.com> wrote:
>>> All,
>>> I would like to instrument classes one at a time with soot by writing a
>>> custom classloader that will decide which classes to instrument and then
>>> load that instrumented class during the class loading process. This
>>> would
>>> allow me to run code and only instrument the classes I care about and
>>> at the
>>> same time not having to
>>> re-instrument classes that have not changed.
>>>
>>> Unfortunately I can't seem to figure out how to call into soot so that I
>>> can instrument a single class.
>>>
>>> Has anyone done anything like this? Any ideas? I would be very
>>> grateful for
>>> any suggestions.
>>>
>>> Regards
>>>
>>> David
>>> ------------------------------------
>>>
>>> David Vollmar
>>> kavika at the-dave.com
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Soot-list mailing list
>>> Soot-list at sable.mcgill.ca
>>> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>>>
>>
>>
>> --Eric Bodden
>> Sable Research Group
>> McGill University, Montréal, Canada
>
> David Vollmar
> home: 303 494 5018
> cell: 720 352 1111
> kavika at the-dave.com
>
>
>
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
More information about the Soot-list
mailing list