profiling - JAVA method for Class/Object creation destruction -



profiling - JAVA method for Class/Object creation destruction -

i want create btrace script profile object creation , destruction. need know java methods called when creating or deleting object or class?

thanks in advance.

for object construction utilize constructor methods

@onmethod(clazz="class.name", method="<init>") ...

tracing destruction more hard - can't hook finalize method because not mandatory object provide one.

right need run btrace in unsafe mode , provide own logic using eg. phantomreference notification when instance have been garbage collected ('destructed').

java profiling btrace

Comments

Popular posts from this blog

c - Compilation of a code: unkown type name string -

java - Bypassing "final local variable defined in an enclosing type" -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -