On Tue, Apr 10, 2018 at 9:26 AM, Pietro Paolini
wrote:
>>
>> 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
>
> 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?
I would like to inspect the variable's name/value
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:
ThreadM
>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
to inspect the stack-frame of a specific thread, I came across
the StackFrame/ThreadReference classes but I couldn’t find a way examples where
their usage is shown
without connecting to the VM somehow, like a debugger would do.
Is it possible to
inspect a thread’s stack “locally” ? In my
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
but the functionality does not seem to be available (yet!) via a public API.
On 04/06/2018 05:13 PM, Pietro Paolini wrote:
> Is it possible to
>
> inspect a thread’s stack “locally” ?
Have you looked at ThreadMXBean.getThreadInfo(id).getStackTrace() ?
--
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF
amples where their usage is shown
>
> without connecting to the VM somehow, like a debugger would do.
>
>
>
> Is it possible to
>
>
>
> inspect a thread’s stack “locally” ? In my mind I could be able to have a
> function such as :
>
>
>
> static void hook(Thread
couldn’t find a way examples where
their usage is shown
without connecting to the VM somehow, like a debugger would do.
Is it possible to
inspect a thread’s stack “locally” ? In my mind I could be able to have a
function such as :
static void hook(Thread thread) {
thread.wait() // stop that