Re: Instrumentation in native code
Nathan Ricci <[email protected]>
| Newsgroups | gmane.comp.java.objectweb.asm |
|---|---|
| Message-ID | <CALh3YaMWa2ycLUoWMPsf_6-kr4u30F-CeYB3Kpoojt5GT0kjFg@mail.gmail.com> |
I've had some luck using a JVMTI agent, and piping byte
codes over to a separate process that is using ASM. This is not fast,
but you only pay the cost once per class.
--Nathan Ricci
On Sun, Oct 9, 2011 at 3:54 PM, Prashant Deva <[email protected]> wrote:
> I was wondering if there is a bytecode instrumentation library similar to
> asm for C/C++.
> Since ASM is written in Java, it can only be used within a javaagent.
> This limits its ability to instrument classes loaded before the java agent
> loads.
> For example, we would like to add fields to the java.lang.Thread class.
> This can only be done through a native agent, since by the time the
> javaagent loads, the Thread class is already loaded and thus we cannot add
> fields to it.
> Prashant
>
>
> --
> You receive this message as a subscriber of the [email protected] mailing list.
> To unsubscribe: mailto:[email protected]
> For general help: mailto:[email protected]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>
message-footer.txt
(text/plain, 238 B)
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws