capturing method entry/exit efficiently
xguan at cse.unl.edu
Mon Aug 31 22:39:54 PDT 2009
My current research project with hotspot requires me to do something
particular whenever a method(interpreted or compiled) is invoked. I
need to know the thread and the method at the invocation time. What I
am trying to do is to do some VM hacking based on the methods called.
Question 1: Can I use BCI to achieve this?
I am now able to capture the method_entry/exit events by writing a
JVMTI agent, but it's not what I really need to do. By using JVMTI,
performance is deteriorated a lot. And I am not sure if the compiled
method can still be captured. (Though I know java1.5 has some JVMPI
support in the compilation part, but not in java1.7. Am I right?).
Question 2: I am trying find a way to enable the
notify_method_enry/exit by partly simulating an JVMTI agent, that
means that I modify several parts in the hotspot without actually use
an external JVMTI agent. Is it feasible? (in terms of perfomance)
Question 3: Is there some better way to capture the method_entry/exit event?
Thanks for diluting the question marks in my mind!
Tony (Xiaohua Guan)
hotspot-gc-use mailing list
hotspot-gc-use at openjdk.java.net
More information about the hotspot-gc-dev