You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sirona.apache.org by Romain Manni-Bucau <rm...@gmail.com> on 2013/12/07 19:58:26 UTC

javaagent enhancements and TODO for motivated people

Hi

just updated our javaagent to be able to enhance JVM classes.

There are however still some issues to fix (shouldn't be that hard so
feel free to grab it since I'm not sure to get enough time before some
weeks):
1) https://issues.apache.org/jira/browse/SIRONA-16: ATM we only
support enhancement of HttpUrlConnection, the conf needs to be updated
to allows more. Basically we could simply remove the loader == null
test but I wonder if we shouldn't use the opposite of current strategy
for JVM classes = exclude excepted if include....so some work to do on
the config. We can also just read a config file listing classes to
enhance (instead of the harded list). I'm ok with both solutions while
it is overridable by conf.
2) we can surely enhance our instrumentation. Today if a class is
instrumentable we instrument all its methods (+ add our static init).
Then at runtime we compute the listeners needed by method (we cache
them of course ;). The enhancement would be to compute listener at
enhancing time and enhance a method only is needed. It means the
filtering done on method would be useless then. It would simply the
conf IMO.


Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau

Re: javaagent enhancements and TODO for motivated people

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Romain,

thanks for the update. It makes sense.

Regards
JB

On 12/09/2013 12:34 AM, Romain Manni-Bucau wrote:
> should be ok now,
>
> while i speak about javaagent: i didnt allowed/added in the api the
> fact to access method parameters in our listeners, that's to avoid to
> play with the stack multiple times (2) since it costs a lot. We can
> rework it later but I think we can avoid the need of it pretty often
> and I really hope always
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
>
>
>
> 2013/12/8 Romain Manni-Bucau <rm...@gmail.com>:
>> done (I still need to write the doc).
>>
>> btw I found another issue: we doesn't support methods returning
>> something else than an Object (primitives but maybe void - didnt check
>> this one)
>>
>> Shouldn't be a big deal in our visitor but needs to be addressed
>>
>> any help to find good defaults for includes/excludes in
>> CounterListener would be welcomed too
>> Romain Manni-Bucau
>> Twitter: @rmannibucau
>> Blog: http://rmannibucau.wordpress.com/
>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>> Github: https://github.com/rmannibucau
>>
>>
>>
>> 2013/12/7 Romain Manni-Bucau <rm...@gmail.com>:
>>> Hi
>>>
>>> just updated our javaagent to be able to enhance JVM classes.
>>>
>>> There are however still some issues to fix (shouldn't be that hard so
>>> feel free to grab it since I'm not sure to get enough time before some
>>> weeks):
>>> 1) https://issues.apache.org/jira/browse/SIRONA-16: ATM we only
>>> support enhancement of HttpUrlConnection, the conf needs to be updated
>>> to allows more. Basically we could simply remove the loader == null
>>> test but I wonder if we shouldn't use the opposite of current strategy
>>> for JVM classes = exclude excepted if include....so some work to do on
>>> the config. We can also just read a config file listing classes to
>>> enhance (instead of the harded list). I'm ok with both solutions while
>>> it is overridable by conf.
>>> 2) we can surely enhance our instrumentation. Today if a class is
>>> instrumentable we instrument all its methods (+ add our static init).
>>> Then at runtime we compute the listeners needed by method (we cache
>>> them of course ;). The enhancement would be to compute listener at
>>> enhancing time and enhance a method only is needed. It means the
>>> filtering done on method would be useless then. It would simply the
>>> conf IMO.
>>>
>>>
>>> Romain Manni-Bucau
>>> Twitter: @rmannibucau
>>> Blog: http://rmannibucau.wordpress.com/
>>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>>> Github: https://github.com/rmannibucau

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: javaagent enhancements and TODO for motivated people

Posted by Romain Manni-Bucau <rm...@gmail.com>.
should be ok now,

while i speak about javaagent: i didnt allowed/added in the api the
fact to access method parameters in our listeners, that's to avoid to
play with the stack multiple times (2) since it costs a lot. We can
rework it later but I think we can avoid the need of it pretty often
and I really hope always
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2013/12/8 Romain Manni-Bucau <rm...@gmail.com>:
> done (I still need to write the doc).
>
> btw I found another issue: we doesn't support methods returning
> something else than an Object (primitives but maybe void - didnt check
> this one)
>
> Shouldn't be a big deal in our visitor but needs to be addressed
>
> any help to find good defaults for includes/excludes in
> CounterListener would be welcomed too
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
>
>
>
> 2013/12/7 Romain Manni-Bucau <rm...@gmail.com>:
>> Hi
>>
>> just updated our javaagent to be able to enhance JVM classes.
>>
>> There are however still some issues to fix (shouldn't be that hard so
>> feel free to grab it since I'm not sure to get enough time before some
>> weeks):
>> 1) https://issues.apache.org/jira/browse/SIRONA-16: ATM we only
>> support enhancement of HttpUrlConnection, the conf needs to be updated
>> to allows more. Basically we could simply remove the loader == null
>> test but I wonder if we shouldn't use the opposite of current strategy
>> for JVM classes = exclude excepted if include....so some work to do on
>> the config. We can also just read a config file listing classes to
>> enhance (instead of the harded list). I'm ok with both solutions while
>> it is overridable by conf.
>> 2) we can surely enhance our instrumentation. Today if a class is
>> instrumentable we instrument all its methods (+ add our static init).
>> Then at runtime we compute the listeners needed by method (we cache
>> them of course ;). The enhancement would be to compute listener at
>> enhancing time and enhance a method only is needed. It means the
>> filtering done on method would be useless then. It would simply the
>> conf IMO.
>>
>>
>> Romain Manni-Bucau
>> Twitter: @rmannibucau
>> Blog: http://rmannibucau.wordpress.com/
>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>> Github: https://github.com/rmannibucau

Re: javaagent enhancements and TODO for motivated people

Posted by Romain Manni-Bucau <rm...@gmail.com>.
done (I still need to write the doc).

btw I found another issue: we doesn't support methods returning
something else than an Object (primitives but maybe void - didnt check
this one)

Shouldn't be a big deal in our visitor but needs to be addressed

any help to find good defaults for includes/excludes in
CounterListener would be welcomed too
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2013/12/7 Romain Manni-Bucau <rm...@gmail.com>:
> Hi
>
> just updated our javaagent to be able to enhance JVM classes.
>
> There are however still some issues to fix (shouldn't be that hard so
> feel free to grab it since I'm not sure to get enough time before some
> weeks):
> 1) https://issues.apache.org/jira/browse/SIRONA-16: ATM we only
> support enhancement of HttpUrlConnection, the conf needs to be updated
> to allows more. Basically we could simply remove the loader == null
> test but I wonder if we shouldn't use the opposite of current strategy
> for JVM classes = exclude excepted if include....so some work to do on
> the config. We can also just read a config file listing classes to
> enhance (instead of the harded list). I'm ok with both solutions while
> it is overridable by conf.
> 2) we can surely enhance our instrumentation. Today if a class is
> instrumentable we instrument all its methods (+ add our static init).
> Then at runtime we compute the listeners needed by method (we cache
> them of course ;). The enhancement would be to compute listener at
> enhancing time and enhance a method only is needed. It means the
> filtering done on method would be useless then. It would simply the
> conf IMO.
>
>
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau