We want to prevent infinite loops in java plugins as well as put limits on number of statements executed. We have looked at many Java profiling tools and are not seeing any clear way to track this as the Java class is running as opposed to just getting some stats after it completes.
I should add that we are aware of jProfiler and this is not an option because we need to track potentially thousands of separate classes with minimal overhead and we need to do this all in code so we can kill a particular executing class should it exceed preset limits.
Thanks!