On Sun, Apr 12, 2009 at 4:28 PM, Robert Fischer <
robert.fisc...@smokejumperit.com> wrote:

>
> Coming off of the TCO conversation -- what's the easiest way to track
> information about stack depth
> on the JVM?  Certainly I could create a Throwable and call
> fillInStackTrace(), but is there a more
> direct way to determine the maximum and current stack depth?
>

There is a call for it in JVMTI (
http://java.sun.com/javase/6/docs/platform/jvmti/jvmti.html#GetFrameCount),
but it'll require you to write C code. Since it's a "Required Functionality"
you don't need to install an agent to access this functionality, it can be
done through dynamic JNI loading.

It would be nice if we could get support for accessing (parts of) JVMTI from
Java.

/Tobias

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "JVM 
Languages" group.
To post to this group, send email to jvm-languages@googlegroups.com
To unsubscribe from this group, send email to 
jvm-languages+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jvm-languages?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to