This content has been marked as final. Show 4 replies
Sandeep_P wrote:No. Why do you need an jvmti event here. What information you need from the vm with this event?
i am working on a project ( JVMTI Based profiler ) where in my need is to dump stack TRACE after specific time interval(say every 20 mili second). so,
1) can i have any event which would fire after predefined time interval (in JVMTI)?
2) can we create our own event and decide when it would be fired(in JVMTI)?No. If you need any particular information from vm?
3) can we achive this with any other way?You can implement this in your native code and you do not need vm. Create a native/java thread and create your own
events fire at your predefined intervals.
any kind of suggestion is most welcome.
thanks for you reply.
i need calls stack to view (calls hierarchy )and check performance of each method(Except JDKs methods).
You'll have to get events from something other than the VM (another thread, or ask the OS fro signals or whatever else you can think of). Then you'll have to get a jvmtiEnv some how. They are good across threads, so I think you can just keep one in a static variable.
If you are interested in method profiling then I would suggest you to use VisualVM and it has filtering
capacity also you could use btrace tool.
Try the jdi. jdi has class filtering capability you can filter jdk methods.
I think btrace is best option for you.