Skip to content

Opamp always on profiler locks reporting - #3059

Draft
robsunday wants to merge 21 commits into
signalfx:mainfrom
robsunday:opamp-always-on-profiler-locks
Draft

robsunday wants to merge 21 commits into
signalfx:mainfrom
robsunday:opamp-always-on-profiler-locks

Conversation

@robsunday

@robsunday robsunday commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

This PR adds thread lock state reporting for JFR thread-dump samples. When enabled, profiling samples include lock relationships alongside thread stack and state information, improving visibility into blocked threads and deadlocks.

Changes

  • Added report_locks declarative configuration.

  • Added splunk.profiler.locks.enabled environment configuration.

  • Extended thread-dump parsing to capture:

    • Locks a thread is waiting on
    • The owning thread
    • Locks held by the thread
  • Added support for extracting lock owners from JFR deadlock reports.

  • Added lock labels to exported pprof samples:

    • lock.waiting_on
    • lock.owner_thread
    • lock.held.
  • Preserved lock metadata even when stack traces are truncated by the configured stack depth.

  • Refactored thread-dump parsing into the threaddump package and introduced structured stack trace data.

  • Added parser, processor, deadlock extraction, configuration, and exporter tests, including deadlock and blocked-thread fixtures.

Lock reporting remains disabled by default.

Limitations

Ownable synchronizer owners, such as ReentrantLock holders, can only be resolved when the JFR thread dump includes matching deadlock information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant