Skip to content

ddprof TaskBlock bridge and lock-support / object-wait instrumentations - #11247

Closed
kaahos wants to merge 33 commits into
masterfrom
paul.fournillon/wallclock-signals-mitigation
Closed

ddprof TaskBlock bridge and lock-support / object-wait instrumentations#11247
kaahos wants to merge 33 commits into
masterfrom
paul.fournillon/wallclock-signals-mitigation

Conversation

@kaahos

@kaahoskaahos commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

What Does This Do

  • Extends ProfilingContextIntegration with getCurrentTicks, recordTaskBlock, parkEnter, parkExit and wires DatadogProfilingIntegration -> DatadogProfiler -> JavaProfiler.
  • Adds lock-support instrumentation (Instrumenter.ForBootstrap): LockSupport.park* / unpark, using bootstrap helpers (LockSupportHelper) for unpark -> park span handoff; parkEnter runs even without an active span so native code can track parked intervals; datadog.TaskBlock emission stays in java-profiler (duration / span gates).
  • Adds object-wait instrumentation.
  • Registers integration toggles in metadata/supported-configurations.json: DD_TRACE_LOCK_SUPPORT_ENABLED, DD_TRACE_OBJECT_WAIT_ENABLED (defaults true).

Motivation

java-profiler avoids firing wall-clock samples on threads that are clearly idle in sleep or park, and it can emit datadog.TaskBlock events for blocked time. The Java agent has to call the new JNI entry points with timing and span context so those TaskBlock events match real tracing work.

Additional Notes

  • linked PR: java-profiler must ship the matching ddprof artifact (JNI + native) before this PR can be merged.
  • encode / encodeOperationName / encodeResourceName behavior remains 0 for ddprof (same as prior ProfilingContextIntegration defaults); comment clarifies intent.
  • Object.wait: only wait(long) is instrumented, wait() / wait(long, int) route through it on HotSpot.

Contributor Checklist

Jira ticket: [PROf-14354]

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.

@kaahoskaahos self-assigned this Apr 30, 2026
@kaahos
kaahosforce-pushed the paul.fournillon/wallclock-signals-mitigation branch from bf909b9 to 769b169CompareMay 3, 2026 15:42
@kaahos
kaahosforce-pushed the paul.fournillon/wallclock-signals-mitigation branch from e60eeb3 to e2f9451CompareMay 3, 2026 17:35
@kaahos
kaahosforce-pushed the paul.fournillon/wallclock-signals-mitigation branch from cacbd64 to c210dd3CompareMay 4, 2026 13:27
@kaahos
kaahosforce-pushed the paul.fournillon/wallclock-signals-mitigation branch from c210dd3 to 0084005CompareMay 4, 2026 16:22
@kaahos
kaahosforce-pushed the paul.fournillon/wallclock-signals-mitigation branch from 70aed84 to fb099b6CompareMay 7, 2026 13:36
@kaahos
kaahosforce-pushed the paul.fournillon/wallclock-signals-mitigation branch 2 times, most recently from 5cee2ee to f3dddfbCompareMay 11, 2026 21:15
@kaahos
kaahosforce-pushed the paul.fournillon/wallclock-signals-mitigation branch from f3dddfb to 584d2fcCompareMay 11, 2026 22:29
@kaahoskaahos changed the title Add profiler integration for wall-clock signal suppression and TaskBlock eventsddprof TaskBlock bridge and lock-support / object-wait instrumentationsMay 11, 2026
@dd-octo-stsdd-octo-stsBot deleted a comment from github-actionsBotMay 15, 2026
@datadog-official

datadog-officialBot commented May 21, 2026

Copy link
Copy Markdown
Contributor

Pipelines

Fix all issues with BitsAI or with Cursor

⚠️ Warnings

🚦 11 Pipeline jobs failed

DataDog/apm-reliability/dd-trace-java | test_smoke: [11, 2/8] View in DatadogGitLab

🔧 Fix in code (Fix with Cursor). 20 tests failed during profiling integration tests. Exception: There were failing tests.

DataDog/apm-reliability/dd-trace-java | test_smoke: [17, 2/8] View in DatadogGitLab

🔧 Fix in code (Fix with Cursor). Execution failed for task ':dd-smoke-tests:profiling-integration-tests:test' due to multiple failing tests. See report at: file:///go/src/github.com/DataDog/apm-reliability/dd-trace-java/workspace/dd-smoke-tests/profiling-integration-tests/build/reports/tests/test/index.html

DataDog/apm-reliability/dd-trace-java | test_smoke: [21, 2/8] View in DatadogGitLab

🔧 Fix in code (Fix with Cursor). 10 failed tests with AssertionFailedError in profiling integration tests.

View all 11 failed jobs.

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 343c2e5 | Docs | Datadog PR Page | Give us feedback!

@kaahoskaahos closed this Jun 3, 2026
Sign up for freeto 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

@kaahos