You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(profiler): add jvmtistacks option to use JVMTI/JFR stack-walker (PROF-14350) (#504)
Adds a new jvmtistacks profiler option that, when enabled, delegates CPU
and wall-clock stack-trace collection to HotSpot's JFR RequestStackTrace
JVMTI extension (available in JDK 27+). This allows the profiler to
leverage the JVM's own safepoint-based stack walker instead of ASGCT,
which improves reliability in cases where ASGCT cannot walk the stack.
Engine selection:
- CPU: prefers CTimerJvmti (per-thread timers) → ITimerJvmti (setitimer)
→ falls back to ASGCT engines with a warning if neither is available
- Wall-clock: uses WallClockJvmti when the extension is present
Signal safety and correctness fixes included:
- Guard against null fn pointer in VM::requestStackTrace()
- Restore errno on early return in WallClockJvmti::signalHandler
- Save/restore SIGPROF handler in ITimerJvmti::check() probe
- Align recordEventDelegated() with recordEvent() semantics (break not return)
- Remove no-op initializeRequestStackTrace() retry in Profiler::start()
- Treat per-thread CTimer registration failures as benign during start()
(threads may exit between listThreads() and registerThread())
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
0 commit comments