why perm generation is continuously increasing?

Andreas Loew Andreas.Loew at oracle.com
Mon Feb 20 06:37:56 PST 2012


Hi Li,

to the best of my knowledge, there is no tutorial describing this 
specific use case (setNativeMethodPrefix()), but there are some 
tutorials which show how to write a ClassFileTransformer and configure 
instrumentation with a "-javaagent" from the command line:

http://www.javalobby.org/java/forums/t19309.html
http://schuchert.wikispaces.com/WritingYourOwnJavaAgent
http://dhruba.name/2010/02/07/creation-dynamic-loading-and-instrumentation-with-javaagents

HTH & best regards,

Andreas


Am 20.02.2012 03:44, schrieb Li Li:
> I am not familiar with Instrumentation. is there any tutorial for me 
> to get started?
>
> On Sat, Feb 18, 2012 at 4:43 AM, Andreas Loew <Andreas.Loew at oracle.com 
> <mailto:Andreas.Loew at oracle.com>> wrote:
>
>     Hi Li,
>
>     citing from here:
>     http://kenai.com/projects/btrace/forums/forum/topics/1109-Tracing-simple-program-on-Windows
>
>     "BTrace currently does not support tracing native methods. But, it
>     may be feasible to support tracing native methods using native
>     method prefixing support of java.lang.instrument.
>     (http://java.sun.com/javase/6/docs/api/java/lang/instrument/Instrumentation.html#isNativeMethodPrefixSupported%28%29)
>     <http://java.sun.com/javase/6/docs/api/java/lang/instrument/Instrumentation.html#isNativeMethodPrefixSupported%28%29%29>."
>
>     I have never tried this myself, but see
>     http://docs.oracle.com/javase/6/docs/api/java/lang/instrument/Instrumentation.html#setNativeMethodPrefix%28java.lang.instrument.ClassFileTransformer,%20java.lang.String%29
>     on how you should probably be able to work around this by using
>     byte code instrumentation and then have BTrace apply your probe
>     into the intern() method of your instrumentation wrapper class...
>
>     HTH & best regards,
>
>     Andreas
>
>     Am 17.02.2012 07:52, schrieb Li Li:
>
>         I want to use btrace to locate which function call String.intern()
>         but from
>         http://kenai.com/projects/btrace/forums/forum/topics/1109-Tracing-simple-program-on-Windows
>         it seems it's not feasible
>         any other methods?
>         I tried trace method call of String, constructor method and
>         trim method is ok. but native method like intern is not.
>

-- 
Andreas Loew | Senior Java Architect
ACS Principal Service Delivery Engineer
ORACLE Deutschland B.V. & Co. KG




More information about the hotspot-gc-use mailing list