Re: inspect a thread’s stack
JC Beyler
jcbeyler at google.com
Mon Apr 9 16:27:11 UTC 2018
I think the conversation will shift a bit if you explain what you mean with:
"// inspect the frames of that thread doing any needed business with them"
What exactly do you have in mind? Do you want to change the stack in some
way?
Because, depending on what you want, Andrew's comment on:
ThreadMXBean.getThreadInfo(id).getStackTrace() ?
seems reasonable to me :)
Jc
On Mon, Apr 9, 2018 at 1:51 AM Pietro Paolini <
Pietro.Paolini at alfasystems.com> wrote:
>
> >Access to stacktraces with locals is demoed in this test
> >
> http://hg.openjdk.java.net/jdk/jdk/file/tip/test/jdk/java/lang/StackWalker/LocalsAndOperands.java
>
> Maybe I haven't read it well enough but isn't that accessible through
> https://docs.oracle.com/javase/9/docs/api/java/lang/StackWalker.html ? As
> long as you are on Java 9 that should not
> be a problem.
>
> >but the functionality does not seem to be available (yet!) via a public
> API.
>
> What do you mean ? Isn't that a public API ?
>
> Thanks,
> P.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20180409/e1e3a08e/attachment.html>
More information about the serviceability-dev
mailing list