Skip to content

Add profiler integration for wall-clock signal suppression and TaskBlock events#11247

Draft
kaahos wants to merge 8 commits intomasterfrom
paul.fournillon/wallclock-signals-mitigation
Draft

Add profiler integration for wall-clock signal suppression and TaskBlock events#11247
kaahos wants to merge 8 commits intomasterfrom
paul.fournillon/wallclock-signals-mitigation

Conversation

@kaahos
Copy link
Copy Markdown

@kaahos kaahos commented Apr 30, 2026

What Does This Do

  • Adds ProfilingContextIntegration hooks (ticks, TaskBlock, park enter/exit) and wires DatadogProfilingIntegration -> JavaProfiler.
  • ProfilingDdprofWallClockBridge: if getProfilingContext() is null on park exit, still call native parkExit (registered from DatadogProfilingIntegration).
  • LockSupport: instrument park* / unpark parkEnter always (span optional); actual TaskBlock recording happens inside java-profiler.
  • Object.wait(long) (JDK 21+): may emit TaskBlock after >= 1 ms; unblockingSpanId stays 0.
  • New modules lock-support-profiling, object-wait-profiling + tests.

Motivation

java-profiler changes suppress redundant wall-clock signals while blocked (sleep / park) and record datadog.TaskBlock for analysis. The agent must call those JNI hooks with ticks and span context so suppression and TaskBlock events work end-to-end without dropping correctness.

Additional Notes

  • linked PR: java-profiler must ship the matching ddprof artifact (JNI + native).
  • encode / encodeOperationName / encodeResourceName behavior remains 0 for ddprof (same as prior ProfilingContextIntegration defaults); comment clarifies intent.
  • Object.wait: only wait(long) is instrumented.

Contributor Checklist

Jira ticket: [PROJ-IDENT]

Note: Once your PR is ready to merge, add it to the merge queue by commenting /merge. /merge -c cancels the queue request. /merge -f --reason "reason" skips all merge queue checks; please use this judiciously, as some checks do not run at the PR-level. For more information, see this doc.

@kaahos kaahos self-assigned this Apr 30, 2026
@kaahos kaahos force-pushed the paul.fournillon/wallclock-signals-mitigation branch from bf909b9 to 769b169 Compare May 3, 2026 15:42
@kaahos kaahos force-pushed the paul.fournillon/wallclock-signals-mitigation branch from e60eeb3 to e2f9451 Compare May 3, 2026 17:35
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