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

Delphi change the assembly code of a running process -

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

C++ 11 "class" keyword -