[jboss-user] [Javassist user questions] - Instrument code block within method?

youngde do-not-reply at jboss.com
Fri May 2 09:09:46 EDT 2008


We're building a monitoring tool for our enterprise-class app that uses Javassist for the instrumenting portion. We have method entry/exit instrumentation working fine; now we'd like to be able to instrument code blocks *within* methods. For example, given method frodo(), and a suspicious for() loop within that method, we'd like to be able to 1) identify where in the method the for() loop lives; and 2) wrap the loop with our timing code.

Perhaps a way to instrument a method block bounded by line numbers? If we have to go to the bytecode api, that's fine, but I could use some guidance from the community on how best to approach this.

Thanks for an excellent tool.

david

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4148330#4148330

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4148330



More information about the jboss-user mailing list