Bytecode Execution Timing

Hi All,

I am currently interested in bytecode execution timings, and have been playing with the JVMTI for this purpose. The JVMTI allows one to register a Single Step event with an agent in order to monitor JVM instruction completion. I was considering including a time call here to record the time of instruction completion.

Q: Is JVMTI the appropriate interface for bytecode timing?

Q: How to calculate the start time of a JVM instruction using JVMTI?

Q: What type of overhead is involved with this type of scheme?

Q: Has anyone tried to calculate bytecode execution times using any other method?

Few questions there, interested to here what you folks think.

Jonathan

[719 byte] By [floating_widgeta] at [2007-10-3 2:34:41]
# 1

The SingleStep event is designed for stepping in the debugger and isn't typically used by tools taking performance measurements. Depending on the VM implementation it is possible that enabling this event could inhibit some performance optimizations and your results won't be useful. Instead, the recommended approach is to use bytecode instrumentation and you'll find an overview of this topic in the spec.

alan.batemana at 2007-7-14 19:33:39 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...