Re: Instrumentation in native code
Nikita Salnikov-Tarnovski <[email protected]>
| Newsgroups | gmane.comp.java.objectweb.asm |
|---|---|
| Message-ID | <[email protected]> |
Starting from java 6 you can retransform already loaded classes. See http://download.oracle.com/javase/6/docs/api/java/lang/instrument/Instrumentation.html#retransformClasses(java.lang.Class...) Nikita On Oct 9, 2011, at 22:54, Prashant Deva 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