-
Notifications
You must be signed in to change notification settings - Fork 937
Closed
Labels
Description
Describe the bug
Supplying cstack=vm
when attaching to current mainline JDK quickly fails with "VMStructs stack walking is not supported on this JVM/platform". I suspect this is because JDK-8343789 moved the VMStructs::_metadata_offset
field.
The following patch makes the profiling work, although lots of stacks become [unknown]
:
diff --git a/src/vmStructs.cpp b/src/vmStructs.cpp
index 7aa94c9..cd0331f 100644
--- a/src/vmStructs.cpp
+++ b/src/vmStructs.cpp
@@ -509,7 +509,7 @@ void VMStructs::resolveOffsets() {
&& _data_offset >= 0
&& _scopes_data_offset != -1
&& _scopes_pcs_offset >= 0
- && _nmethod_metadata_offset >= 0
+// && _nmethod_metadata_offset >= 0
&& _thread_vframe_offset >= 0
&& _thread_exception_offset >= 0
&& _constmethod_size >= 0;
VMStructs
parsing code might need to learn about new state of JDK 25 to work correctly.
Expected vs. actual behavior
Profiling works on JDK (25) mainline.
Reproduction Steps
Run mainline JDK with -agentpath:build/lib/libasyncProfiler.so=start,event=cpu,file=profile.html,interval=100us,cstack=vm
.
Additional Information/Context
No other context, I have not debugged it further.
Async-profiler version
current HEAD
Environment details
No response