Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Bytecode instrumentation

843811May 18 2002 — edited Feb 12 2003
Hi,

I'm going to add some profiling facility to my J2EE application. Since only business method invocations for selected EJBs is required to performance monitor and monitoring must be done in the production environment, I stick with bytecode instrumentation.

I have to add a startTimer functionality at the beginning of the method and a stopTimer functionality before returning from that method.

startTimer is OK, it's easy to find the beginning of each method in the bytecode.

What about stopTimer? Do I need to catch every return and throw instructions? Or can I use finally block of exception handling somehow? I'm interesting in your experience before doing anything!

Thanks for your help,
SB
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 12 2003
Added on May 18 2002
7 comments
240 views