RFR: JDK-8253001: [JVMCI] Add API for getting stacktraces independently of current thread
Allan Gregersen
github.com+4676506+javeleon at openjdk.java.net
Fri Sep 11 10:39:02 UTC 2020
The idea is to add a more powerful API for cases where the current iterateFrames API cannot be used.
For example, a debugger needs access to the content of stack frames such as local variables or monitors. In cases where
threads execute in the runtime or in native code, it's not possible to obtain a thread suspension hook, for which
iterateFrames can be used on the suspended thread. The getStackFrames method enables an immediate stack frames lookup
regardless of the status of the underlying thread. Another use case would be for lookup of backtraces for non-current
threads.
The implementation is done by means of a VM operation that collects vframe data for each thread during a safepoint,
whereafter required object reallocation/reassign fields is performed based on the collected snapshot.
-------------
Commit messages:
- Implement new getStackFrames API for fetching stack frames from a set of threads at once
Changes: https://git.openjdk.java.net/jdk/pull/110/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=110&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8253001
Stats: 2572 lines in 17 files changed: 2316 ins; 63 del; 193 mod
Patch: https://git.openjdk.java.net/jdk/pull/110.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/110/head:pull/110
PR: https://git.openjdk.java.net/jdk/pull/110
More information about the hotspot-dev
mailing list