Skip to content

feat(taskblock): record completed intervals with DEBUG diagnostic receipts (PROF-14931) - #664

Open
kaahos wants to merge 55 commits into
sphinx/fix-663-review-findingsfrom
paul.fournillon/taskblock-core
Open

kaahos wants to merge 55 commits into
sphinx/fix-663-review-findingsfrom
paul.fournillon/taskblock-core

Conversation

@kaahos

@kaahos kaahos commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?:

Adds the datadog.TaskBlock JFR event and the public paired API JavaProfiler.beginTaskBlock() / endTaskBlock(token, blocker, unblockingSpanId). One event describes one completed blocked interval. The exit hook captures the stack synchronously.

  • Token-qualified, generation-based ownership in WallClockBlockTracker separates owned blocked time from ordinary wall samples. Stale or wrong-thread tokens cannot close a newer run.
  • TaskBlockRecorder checks eligibility at exit: unfiltered wall precheck, no active span, no context-window crossing, and a duration of at least 1 ms.
  • Unowned wall tails are kept through thread teardown and JFR dumps. stop() flushes them before engine teardown.
  • DEBUG builds add a bounded TaskBlockDiagnostics receipt ring that records each recorder decision outside Recording. Release builds compile it out.

Motivation:

A known blocking interval should not need repeated wall signals to show its elapsed time. One completed-at-exit event gives the exact duration and the blocking stack. Context-scoped profiling keeps its ordinary samples.

A missing event in a decoded JFR file does not tell why it is missing. The DEBUG receipts show where the native path stopped (admission, ownership, stack capture or serialization). They do not allocate or log on signal paths.

Additional Notes:

  • Stack: builds on fix(wall): preserve context and sampling-epoch provenance across dumps (PROF-12146) #890. This PR adds the recorder and the paired API only. JVM producers (feat(taskblock): add JVM producers and retain failed recording output (PROF-14931) #665) and native I/O producers (feat(taskblock): compose Linux native I/O producers with shared socket hooks (PROF-14931) #666) are separate layers.
  • Reviewer acknowledgment, JFR schema and API:
    • New event datadog.TaskBlock, JFR type id T_TASK_BLOCK = 133. Fields: startTime, duration, eventThread, blocker, unblockingSpanId, stackTrace, observedBlockingState, spanId, localRootSpanId, plus context attributes.
    • datadog.WallClockSamplingEpoch renames numSuppressedSampledRun to numSuppressedOwnedBlock. The counter wc_signals_suppressed_sampled_run becomes wc_signals_suppressed_owned_block. Consumers must handle the rename.
    • The paired API works on platform threads only. It returns 0 / false on virtual threads and outside unfiltered wall precheck.
  • Reviewer acknowledgment, best-effort recorder: recordTaskBlock() takes the recording stripe with try-and-drop, like the sample paths. A busy stripe or a failed serialization drops the event and increments task_block_record_failed. endTaskBlock() then returns false. Callers must not treat an event as guaranteed.
  • Reviewer acknowledgment, stop never skips teardown: stop() writes pending unowned wall tails after the signal and TaskBlock drains, with bounded retries. It recovers full JFR thread tables without a dump. A tail it still cannot write is dropped, its weight is added to wc_unowned_tail_dropped_at_stop, and teardown continues. Why: one unwritable tail must not leave the profiler half stopped.
  • Reviewer acknowledgment, retained memory: a failed tail write keeps its tracker slot retired until a later drain writes it. That backing outlives the recording and is charged to the native-memory category wall_block_tracker, because wallclock reads 0 when idle. The stop-time thread-ID archive is charged to jfr_buffers and freed with the recording.
  • Reviewer acknowledgment, DEBUG footprint: the receipt ring has 4,096 cells (736 KiB per JfrIntegration.md) charged to NM_MISC, plus a 40-byte payload per paired-API owner. Receipts are lossy under contention; BUFFER_ACCEPTED means serialization returned, not consumer delivery.
  • Delegated and lightweight=true wall sampling keep unit weight for unowned blocks: they have no reusable local trace ID for a deferred tail.
  • Not included: automatic producers, backend conversion, production rollout.
  • Contracts: JfrIntegration, ProfilingEngines, TLSContext, CallTraceStorage.
  • Merged with current main, stop() order: drain task-block rotation, then close the reference-chain gate and join the BFS thread, then flush unowned tails. A failed join ends the rotation and returns a retryable error, so a retried stop() runs both steps again and the flush runs once.
  • Test determinism: the unfiltered wall-tail context-transition tests seed the tail and run the A→B transition with profiling signals blocked, so a wall signal between readiness and setTraceContext() cannot flush the tail early. The across-dump test driver returns the failing step and retries (≤2 s) only on try-and-drop lock contention; a forced-drop test covers each step.
  • Human review: mandatory (label human_review:mandatory). Reason: new public Java API and JFR event schema, plus lifecycle and atomic changes on signal-reachable wall-clock paths.

How to test the change?:

Added and changed coverage:

  • gtests: taskBlockRecorder_ut (eligibility, threshold, activity admission and rotation drain, stale tokens), taskBlockDiagnostics_ut (ring publication, gaps, overwrite, exhaustion), wallTailRecording_ut (tail retention across dumps and teardown), flightRecorder_wallEpoch_ut (stop-time flush, drop counting, thread-table capacity recovery), flightRecorder_result_ut, wallClockBlockTracker_ut, wallClockTestEpochGuard_ut, threadLocalDataPool_ut, jvmSupport_ut.
  • Java: JavaProfilerTaskBlockApiTest (all event fields, nested and invalid tokens, live dump, bounded retries for best-effort rejection), JavaProfilerTaskBlockDisabledTest, JavaProfilerTaskBlockLightweightTest, JavaProfilerTaskBlockPreExistingThreadTest, TaskBlockRecorderTestSupportTest, UnownedBlockedTailDumpTest, LiveHeapThenUnownedBlockedTailDumpTest, UnownedWallTailContextTransitionTest.
  • Stress: ParkBlockChurnAntagonistTest, WallClockPrecheckOverheadBenchmarkTest.

Run:

  • ./.claude/commands/build-and-summarize :ddprof-lib:gtestDebug :ddprof-lib:gtestRelease
  • ./.claude/commands/build-and-summarize :ddprof-test:testDebug -Ptests='*TaskBlock*' and the same with :ddprof-test:testRelease
  • ./.claude/commands/build-and-summarize :ddprof-test:testDebug -Ptests='*Unowned*'

For Datadog employees:

  • If this PR touches code that signs or publishes builds or packages, or handles credentials of any kind, I've requested a security review (run the dd:platform-security-review skill, or file a request via the PSEC review form). bewaire also runs automatically on every PR.
  • This PR doesn't touch any of that.
  • JIRA: PROF-14931

Unsure? Have a question? Request a review!

@dd-octo-sts

dd-octo-sts Bot commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

CI Test Results

Run: #45696075426 | Commit: 6b1ec08 | Duration: 26m 34s (longest job)

✅ All 108 test jobs passed

Status Overview

JDK glibc-aarch64/asan glibc-aarch64/debug glibc-aarch64/release glibc-aarch64/tsan glibc-amd64/asan glibc-amd64/debug glibc-amd64/release glibc-amd64/tsan musl-aarch64/debug musl-aarch64/release musl-amd64/debug musl-amd64/release
8 - - - - ✅ ✅ ✅ ✅ - - - -
8-ibm - - - - ✅ ✅ ✅ ✅ - - - -
8-j9 ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ - - - -
8-librca - - - - - - - - ✅ ✅ ✅ ✅
8-orcl - - - - ✅ ✅ ✅ ✅ - - - -
11 - - - - ✅ ✅ ✅ ✅ - - - -
11-j9 ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ - - - -
11-librca - - - - - - - - ✅ ✅ ✅ ✅
17 ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ - - - -
17-graal ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ - - - -
17-j9 ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ - - - -
17-librca - - - - - - - - ✅ ✅ ✅ ✅
21 ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ - - - -
21-graal ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ - - - -
21-librca - - - - - - - - ✅ ✅ ✅ ✅
25 ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ - - - -
25-graal ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ - - - -
25-librca - - - - - - - - ✅ ✅ ✅ ✅

Legend: ✅ passed | ❌ failed | ⚪ skipped | 🚫 cancelled

Summary: Total: 108 | Passed: 108 | Failed: 0


Updated: 2026-11-25 21:04:37 UTC

@dd-octo-sts

dd-octo-sts Bot commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

Reliability & Chaos Results

✅ All reliability & chaos checks passed Pipeline: https://gitlab.ddbuild.io/DataDog/java-profiler/-/pipelines/156587066

@kaahos
kaahos force-pushed the paul.fournillon/taskblock-core branch 2 times, most recently from ad202a1 to 44a17e3 Compare July 16, 2026 15:18
@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

Pipelines

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 12d6456 | Docs | View more details | Give us feedback!

@kaahos
kaahos force-pushed the paul.fournillon/taskblock-core branch 5 times, most recently from 6d59cf5 to 73e3af6 Compare July 20, 2026 14:34
Copilot AI review requested due to automatic review settings July 21, 2026 07:24
@kaahos
kaahos force-pushed the paul.fournillon/taskblock-core branch from 73e3af6 to ebab4c4 Compare July 21, 2026 07:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds first-class TaskBlock event recording to the Java profiler so known blocking intervals can be emitted directly (without relying on wall-clock sampling signals), including native/JFR plumbing and updates to wall-precheck behavior and tests.

Changes:

  • Introduces public Java API beginTaskBlock(int) / endTaskBlock(long, long, long) and native recording pipeline for datadog.TaskBlock.
  • Reworks wall-precheck suppression around lifecycle-owned blocked runs, including unfiltered registry tracking and bounded “lazy backfill” candidate selection.
  • Expands unit/integration/benchmark coverage for unfiltered precheck, restart safety, JVMTI delegation, and TaskBlock behavior.

Reviewed changes

Copilot reviewed 51 out of 51 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
ddprof-test/src/test/java/com/datadoghq/profiler/wallclock/WallclockMitigationsCombinedTest.java Updates combined mitigation assertions to ensure context-scoped threads remain sampled and suppression counters don’t change.
ddprof-test/src/test/java/com/datadoghq/profiler/wallclock/UnfilteredWallPrecheckTest.java Adds integration coverage for owned-block prechecks when filter= samples every thread.
ddprof-test/src/test/java/com/datadoghq/profiler/wallclock/UnfilteredWallPrecheckRestartTest.java Adds restart/epoch safety coverage for unfiltered tracking across multiple recordings.
ddprof-test/src/test/java/com/datadoghq/profiler/wallclock/TaskBlockAssertions.java Adds JMC-based assertion helpers for datadog.TaskBlock contract validation.
ddprof-test/src/test/java/com/datadoghq/profiler/wallclock/PrecheckTest.java Updates precheck tests to new suppression semantics/counters and explicit filter= behavior.
ddprof-test/src/test/java/com/datadoghq/profiler/wallclock/PrecheckEfficiencyTest.java Adjusts workload tests to align with new lifecycle-owned suppression and explicit unfiltered sampling.
ddprof-test/src/test/java/com/datadoghq/profiler/wallclock/JvmtiBasedUnfilteredWallPrecheckTest.java Adds JVMTI-delegated stack path coverage for unfiltered owned-block precheck.
ddprof-test/src/test/java/com/datadoghq/profiler/wallclock/JvmtiBasedPrecheckTest.java Aligns JVMTI precheck tests with explicit filter= commands.
ddprof-test/src/test/java/com/datadoghq/profiler/wallclock/JavaProfilerTaskBlockPreExistingThreadTest.java Verifies TaskBlock TLS init for threads created before profiler startup.
ddprof-test/src/test/java/com/datadoghq/profiler/wallclock/JavaProfilerTaskBlockDisabledTest.java Verifies TaskBlock API stays inactive when not in all-thread scope.
ddprof-test/src/test/java/com/datadoghq/profiler/wallclock/JavaProfilerTaskBlockApiTest.java End-to-end coverage for paired TaskBlock API, nesting/token rules, context admission, vthreads, and live dump behavior.
ddprof-test/src/test/java/com/datadoghq/profiler/wallclock/J9WallClockPrecheckCapabilityTest.java Ensures unsupported J9 wall engine doesn’t activate unfiltered precheck tracking.
ddprof-test/src/test/java/com/datadoghq/profiler/JavaProfilerApiSurfaceTest.java Verifies TaskBlock API is public while internal hooks remain non-public.
ddprof-test/src/test/java/com/datadoghq/profiler/context/OtelContextStorageModeTest.java Ensures trace context is cleared during cleanup (ordering with reset).
ddprof-test/src/test/java/com/datadoghq/profiler/context/AllNativeContextTest.java Ensures trace context is cleared during cleanup (ordering with reset).
ddprof-test/src/test/java/com/datadoghq/profiler/AbstractProfilerTest.java Adds beforeProfilerStart() hook and clears trace context on stopProfiler().
ddprof-stresstest/src/jmh/java/com/datadoghq/profiler/WallClockPrecheckBenchmarkHooks.java Exposes package-scoped hooks for benchmarking owned-block precheck overhead.
ddprof-stresstest/src/jmh/java/com/datadoghq/profiler/stresstest/scenarios/throughput/WallClockPrecheckOverheadBenchmark.java Adds JMH benchmark for steady-state wall timer overhead vs. owned-block population size.
ddprof-lib/src/test/cpp/wallprecheck_args_ut.cpp Adds engine capability and filter= parsing regression tests.
ddprof-lib/src/test/cpp/wallClockCounters_ut.cpp Renames/updates suppression counter tests to owned-block suppression.
ddprof-lib/src/test/cpp/wallClockCandidateSelector_ut.cpp Adds unit tests for bounded candidate selection/backfill logic.
ddprof-lib/src/test/cpp/threadFilter_ut.cpp Expands ThreadFilter tests for registry, epoch, token encoding, and owned-block suppression eligibility.
ddprof-lib/src/test/cpp/taskBlockRecorder_ut.cpp Adds unit tests for TaskBlock eligibility, rotation, and record/stack failure accounting.
ddprof-lib/src/test/cpp/park_state_ut.cpp Updates tests to owned-block state semantics and slot-reset expectations.
ddprof-lib/src/test/cpp/jvmSupport_ut.cpp Adds unit tests for platform vs. virtual thread classification via JNI table probing.
ddprof-lib/src/test/cpp/frame_ut.cpp Adds unit test for copyJvmtiFrames() union-overlap safety.
ddprof-lib/src/main/java/com/datadoghq/profiler/JavaProfiler.java Adds public TaskBlock API and native bindings; clarifies internal hook comments.
ddprof-lib/src/main/cpp/wallClockCounters.h Renames suppressed-sample counter to owned-block suppression counter.
ddprof-lib/src/main/cpp/wallClockCandidateSelector.h Introduces bounded randomized candidate selection with precheck-rejection backfill.
ddprof-lib/src/main/cpp/wallClock.h Integrates candidate selector + new suppression counters and visit budgeting.
ddprof-lib/src/main/cpp/wallClock.cpp Reworks precheck suppression to use ThreadFilter-owned block eligibility and optional lazy backfill/lookup accounting.
ddprof-lib/src/main/cpp/threadLocalData.h Adds per-thread TaskBlock lifecycle state in TLS.
ddprof-lib/src/main/cpp/threadFilter.h Adds registry/unfiltered tracking, epoching, owned-block snapshots/tokens, and suppression eligibility checks.
ddprof-lib/src/main/cpp/threadFilter.cpp Implements registry/TID index, recording epochs, retirement, and owned-block suppression candidate logic.
ddprof-lib/src/main/cpp/taskBlockRecorder.h Adds TaskBlock eligibility checks and recording helper APIs.
ddprof-lib/src/main/cpp/taskBlockRecorder.cpp Implements duration thresholding and basic eligibility helpers.
ddprof-lib/src/main/cpp/profiler.h Adds TaskBlock recording entry points and rotation/inflight coordination.
ddprof-lib/src/main/cpp/profiler.cpp Adds TaskBlock recording implementation, rotation coordination, registry bootstrap for existing threads, and updated filter init semantics.
ddprof-lib/src/main/cpp/jvmThread.h Adds capability query for native thread-id lookup support.
ddprof-lib/src/main/cpp/jvmThread.cpp Implements native thread-id lookup capability helper.
ddprof-lib/src/main/cpp/jvmSupport.h Declares isPlatformThread() helper for virtual thread rejection.
ddprof-lib/src/main/cpp/jvmSupport.cpp Implements JNI table probing to detect virtual threads (JDK 19+).
ddprof-lib/src/main/cpp/jfrMetadata.h Adds new JFR type id for TaskBlock.
ddprof-lib/src/main/cpp/jfrMetadata.cpp Registers datadog.TaskBlock event metadata fields.
ddprof-lib/src/main/cpp/javaApi.cpp Adds native implementations for TaskBlock API + registry-aware filter/add/remove and owned-block hooks.
ddprof-lib/src/main/cpp/frames.h Adds copyJvmtiFrames() helper for overlapping JVMTI/ASGCT frame buffers.
ddprof-lib/src/main/cpp/flightRecorder.h Adds TaskBlock recording entry points in recording/recorder.
ddprof-lib/src/main/cpp/flightRecorder.cpp Implements TaskBlock event serialization and recorder entry.
ddprof-lib/src/main/cpp/event.h Adds TaskBlock event struct; updates wall epoch suppressed counter field name/type usage.
ddprof-lib/src/main/cpp/engine.h Adds wall-engine capability query for unfiltered precheck support.
ddprof-lib/src/main/cpp/counters.h Adds counters for registry lookup budget/retirement and TaskBlock outcomes; renames suppression counter.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ddprof-lib/src/main/cpp/threadFilter.h Resolved
@dd-octo-sts

dd-octo-sts Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Benchmark Results (commit ebab4c4)

Pipeline: https://gitlab.ddbuild.io/DataDog/apm-reliability/benchmarking-platform/-/pipelines/125876908 Commit: ebab4c4a50fba6ef669b18c4aa0aebbdff629a4c

⚠️ Significant outliers

  • 🔴 fj-kmeans (JDK 21): runtime +4.4% (2671→2788 ms)
  • 🔴 future-genetic (JDK 21): runtime +3.6% (2054→2127 ms)
Runtime details (per benchmark × JDK)
Benchmark JDK Latest Dev Δ (dev vs latest) Issues L/D
akka-uct 21 ✅ 10309 ms (21 iters) ✅ 10352 ms (21 iters) ≈ +0.4% (±11.1%) — / —
akka-uct 25 ✅ 8971 ms (24 iters) ✅ 8823 ms (24 iters) ≈ -1.6% (±10.5%) — / —
finagle-chirper 21 ✅ 5997 ms (33 iters) ✅ 5974 ms (33 iters) ≈ -0.4% (±25.4%) ⚠️ W:3 / ⚠️ W:3
finagle-chirper 25 ✅ 5455 ms (36 iters) ✅ 5469 ms (36 iters) ≈ +0.3% (±24.6%) ⚠️ W:3 / ⚠️ W:3
fj-kmeans 21 ✅ 2671 ms (69 iters) ✅ 2788 ms (67 iters) 🔴 +4.4% — / —
fj-kmeans 25 ✅ 2765 ms (68 iters) ✅ 2778 ms (67 iters) ≈ +0.5% (±2.8%) — / —
future-genetic 21 ✅ 2054 ms (91 iters) ✅ 2127 ms (88 iters) 🔴 +3.6% — / —
future-genetic 25 ✅ 2027 ms (91 iters) ✅ 2069 ms (90 iters) ≈ +2.1% (±2.8%) — / —
naive-bayes 21 ✅ 1284 ms (133 iters) ✅ 1244 ms (137 iters) ≈ -3.1% (±32.2%) — / —
naive-bayes 25 ✅ 1013 ms (169 iters) ✅ 1017 ms (168 iters) ≈ +0.4% (±31.6%) — / —
reactors 21 ✅ 16291 ms (15 iters) ✅ 15943 ms (15 iters) ≈ -2.1% (±8.5%) — / —
reactors 25 ✅ 18609 ms (15 iters) ✅ 18693 ms (15 iters) ≈ +0.5% (±4%) — / —
Internal counter details (ddprof)

ddprof internal counters, latest / dev (✅ = 0, · = unavailable):

Benchmark JDK Dropped rec Dropped jvmti Dropped trace Skipped WC AGCT fail Unwind fail
akka-uct 21 ✅ / ✅ ✅ / ✅ ✅ / 3 1885 / 2016 ✅ / ✅ ✅ / ✅
akka-uct 25 ✅ / ✅ ✅ / ✅ 6 / ✅ 2056 / 2299 ✅ / ✅ ✅ / ✅
finagle-chirper 21 ✅ / ✅ ✅ / ✅ 2 / 1 8787 / 8984 ✅ / ✅ ✅ / ✅
finagle-chirper 25 ✅ / ✅ ✅ / ✅ 2 / 1 8287 / 8556 ✅ / ✅ ✅ / ✅
fj-kmeans 21 ✅ / ✅ ✅ / ✅ 1 / 2 1235 / 1277 ✅ / ✅ ✅ / ✅
fj-kmeans 25 ✅ / ✅ ✅ / ✅ 4 / 3 1295 / 1292 ✅ / ✅ ✅ / ✅
future-genetic 21 ✅ / ✅ ✅ / ✅ 2 / 1 3001 / 3006 ✅ / ✅ ✅ / ✅
future-genetic 25 ✅ / ✅ ✅ / ✅ ✅ / 1 2834 / 2887 ✅ / ✅ ✅ / ✅
naive-bayes 21 ✅ / ✅ ✅ / ✅ 5 / 6 3513 / 3477 ✅ / ✅ ✅ / ✅
naive-bayes 25 ✅ / ✅ ✅ / ✅ 2 / ✅ 3500 / 3460 ✅ / ✅ ✅ / ✅
reactors 21 ✅ / ✅ ✅ / ✅ 3 / ✅ 1612 / 1583 ✅ / ✅ ✅ / ✅
reactors 25 ✅ / ✅ ✅ / ✅ 3 / 2 1916 / 1954 ✅ / ✅ ✅ / ✅

@kaahos
kaahos force-pushed the paul.fournillon/taskblock-core branch from ebab4c4 to 19cbe47 Compare July 21, 2026 08:05
@dd-octo-sts

dd-octo-sts Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Benchmark Results (commit 19cbe47)

Pipeline: https://gitlab.ddbuild.io/DataDog/apm-reliability/benchmarking-platform/-/pipelines/125884549 Commit: 19cbe4788734f0e123535816d373913189efef91

⚠️ Significant outliers

  • 🔴 fj-kmeans (JDK 21): runtime +5.5% (2696→2843 ms)
  • 🟢 reactors (JDK 21): runtime -7.7% (16927→15621 ms)
Runtime details (per benchmark × JDK)
Benchmark JDK Latest Dev Δ (dev vs latest) Issues L/D
akka-uct 21 ✅ 10377 ms (21 iters) ✅ 10184 ms (21 iters) ≈ -1.9% (±11.2%) — / —
akka-uct 25 ✅ 8790 ms (24 iters) ✅ 8896 ms (24 iters) ≈ +1.2% (±9.7%) — / —
finagle-chirper 21 ✅ 5965 ms (33 iters) ✅ 5956 ms (33 iters) ≈ -0.2% (±25.2%) ⚠️ W:3 / ⚠️ W:3
fj-kmeans 21 ✅ 2696 ms (70 iters) ✅ 2843 ms (66 iters) 🔴 +5.5% — / —
fj-kmeans 25 ✅ 2796 ms (67 iters) ✅ 2746 ms (68 iters) ≈ -1.8% (±2.8%) — / —
future-genetic 21 ✅ 2052 ms (90 iters) ✅ 2099 ms (89 iters) ≈ +2.3% (±2.6%) — / —
future-genetic 25 ✅ 2035 ms (91 iters) ✅ 2047 ms (91 iters) ≈ +0.6% (±2.7%) — / —
naive-bayes 21 ✅ 1224 ms (139 iters) ✅ 1250 ms (136 iters) ≈ +2.1% (±33.2%) — / —
naive-bayes 25 ✅ 1016 ms (168 iters) ✅ 1017 ms (168 iters) ≈ +0.1% (±31.6%) — / —
reactors 21 ✅ 16927 ms (15 iters) ✅ 15621 ms (15 iters) 🟢 -7.7% — / —
reactors 25 ✅ 17980 ms (15 iters) ✅ 17858 ms (15 iters) ≈ -0.7% (±6.2%) — / —
Internal counter details (ddprof)

ddprof internal counters, latest / dev (✅ = 0, · = unavailable):

Benchmark JDK Dropped rec Dropped jvmti Dropped trace Skipped WC AGCT fail Unwind fail
akka-uct 21 ✅ / ✅ ✅ / ✅ 1 / 2 1969 / 1961 ✅ / ✅ ✅ / ✅
akka-uct 25 ✅ / ✅ ✅ / ✅ ✅ / 3 2168 / 2325 ✅ / ✅ ✅ / ✅
finagle-chirper 21 ✅ / ✅ ✅ / ✅ 3 / 1 8522 / 8623 ✅ / ✅ ✅ / ✅
finagle-chirper 25 ✅ / ✅ ✅ / ✅ 3 / 1 8617 / 8387 ✅ / ✅ ✅ / ✅
fj-kmeans 21 ✅ / ✅ ✅ / ✅ 1 / 2 1273 / 1252 ✅ / ✅ ✅ / ✅
fj-kmeans 25 ✅ / ✅ ✅ / ✅ 1 / 2 1256 / 1264 ✅ / ✅ ✅ / ✅
future-genetic 21 ✅ / ✅ ✅ / ✅ 3 / 1 2942 / 2959 ✅ / ✅ ✅ / ✅
future-genetic 25 ✅ / ✅ ✅ / ✅ 1 / 1 2855 / 2852 ✅ / ✅ ✅ / ✅
naive-bayes 21 ✅ / ✅ ✅ / ✅ 4 / 2 3466 / 3494 ✅ / ✅ ✅ / ✅
naive-bayes 25 ✅ / ✅ ✅ / ✅ 5 / 6 3466 / 3473 ✅ / ✅ ✅ / ✅
reactors 21 ✅ / ✅ ✅ / ✅ ✅ / 2 1660 / 1623 ✅ / ✅ ✅ / ✅
reactors 25 ✅ / ✅ ✅ / ✅ ✅ / ✅ 1789 / 1796 ✅ / ✅ ✅ / ✅

@kaahos
kaahos force-pushed the paul.fournillon/taskblock-core branch from 19cbe47 to 25ba2a3 Compare July 21, 2026 14:33
@DataDog DataDog deleted a comment from dd-octo-sts Bot Jul 21, 2026
@DataDog DataDog deleted a comment from dd-octo-sts Bot Jul 21, 2026
@DataDog DataDog deleted a comment from dd-octo-sts Bot Jul 21, 2026
@DataDog DataDog deleted a comment from dd-octo-sts Bot Jul 21, 2026
@DataDog DataDog deleted a comment from dd-octo-sts Bot Jul 21, 2026
@DataDog DataDog deleted a comment from dd-octo-sts Bot Jul 21, 2026
@DataDog DataDog deleted a comment from dd-octo-sts Bot Jul 21, 2026
@DataDog DataDog deleted a comment from dd-octo-sts Bot Jul 21, 2026
@DataDog DataDog deleted a comment from dd-octo-sts Bot Jul 21, 2026
@DataDog DataDog deleted a comment from dd-octo-sts Bot Jul 21, 2026
@DataDog DataDog deleted a comment from dd-octo-sts Bot Jul 21, 2026
@DataDog DataDog deleted a comment from dd-octo-sts Bot Jul 21, 2026
# Conflicts:
#	ddprof-test/src/test/java/com/datadoghq/profiler/wallclock/UnownedWallTailContextTransitionTest.java
# Conflicts:
#	ddprof-lib/src/main/cpp/wallClockBlockTracker.cpp
@dd-octo-sts

dd-octo-sts Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Memory overhead check: ✅ within budget

Profiler 12d6456ac, pipeline. Budget: utils/memcheck/budget.txt. NMT and /proc values are profiled minus no-profiler runs on the same runner.

scenario metric value Δ since budget set limit headroom
allocs native_mem_live_bytes 21.90 MiB +218 KiB 21.95 MiB 48 KiB ok
allocs native_mem_max_bytes 23.14 MiB +199 KiB 23.20 MiB 57 KiB ok
allocs nmt.class 303 KiB +6 KiB 563 KiB 261 KiB ok
allocs nmt.internal 367 KiB −2 KiB 666 KiB 299 KiB ok
classesM native_mem_live_bytes (coverage-corrected) 23.52 MiB +247 KiB 23.55 MiB 30 KiB ok
classesM native_mem_max_bytes (coverage-corrected) 25.41 MiB +224 KiB 25.45 MiB 42 KiB ok
classesM nmt.class 2.94 MiB −1 KiB 3.20 MiB 267 KiB ok
classesM nmt.internal 3.20 MiB +1 KiB 3.50 MiB 306 KiB ok
mixed native_mem_live_bytes 23.37 MiB +224 KiB 23.45 MiB 83 KiB ok
mixed native_mem_max_bytes 40.97 MiB +258 KiB 41.00 MiB 29 KiB ok
mixed nmt.class 302 KiB −5 KiB 563 KiB 261 KiB ok
mixed nmt.internal 408 KiB −1 KiB 717 KiB 309 KiB ok
threads native_mem_live_bytes 19.31 MiB +229 KiB 19.35 MiB 37 KiB ok
threads native_mem_max_bytes 20.34 MiB +237 KiB 20.40 MiB 60 KiB ok
threads nmt.class 114 KiB +1 KiB 410 KiB 296 KiB ok
threads nmt.internal 159 KiB −5 KiB 461 KiB 302 KiB ok
traces native_mem_live_bytes 20.46 MiB +236 KiB 20.50 MiB 40 KiB ok
traces native_mem_max_bytes 21.68 MiB +275 KiB 21.70 MiB 22 KiB ok
traces nmt.class 470 KiB −1 KiB 768 KiB 298 KiB ok
traces nmt.internal 613 KiB −2 KiB 870 KiB 258 KiB ok

✅ nmt.tracing absent in every scenario.

Not budgeted (too noisy on shared runners)
scenario nmt.code nmt.gc nmt.total proc.VmRSS proc.RssAnon
allocs 1.52 MiB 3 KiB 3.12 MiB 31.51 MiB 27.34 MiB
classesM 6.10 MiB 24 KiB 16.53 MiB 41.77 MiB 37.39 MiB
mixed 1.76 MiB 10 KiB 2.83 MiB 33.56 MiB 28.75 MiB
threads 4 KiB 0 KiB 515 KiB 24.76 MiB 19.72 MiB
traces 5.97 MiB 34 KiB 7.63 MiB 36.53 MiB 32.05 MiB

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: FAIL

TaskBlock adds native APIs, JFR events and wall-precheck integration; earlier truncation, weight-accounting, OpenJ9, capacity and shutdown fixes remain intact. The new transition-test retry path clears its active flag before stop succeeds, so a drain timeout bypasses cleanup and leaves the shared profiler running.

Open Bits AI session

🤖 Bits Code Review · Commit bd6058d

Comment on lines +260 to +261
attemptRecordingActive = false;
profiler.stop();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Keep retry recordings active until stop succeeds

If stopping a successful retry throws a supported drain-timeout error, native stop leaves the profiler RUNNING, but attemptRecordingActive is already false. The enclosing finally therefore skips its second stop, and base cleanup also skips stopping because the original recording set its separate stopped flag to true. This leaves the shared profiler active until subsequent setup recovers it. Clear the attempt flag only after stop succeeds.

Suggested change
attemptRecordingActive = false;
profiler.stop();
profiler.stop();
attemptRecordingActive = false;

React: 👍 useful · 👎 wrong · 😕 unclear · 👀 right, but not acting on it

What each reaction means
  • 👍 Useful: correct, and you're fixing it or will.
  • 👎 Wrong: the finding is incorrect, for example the bug can't happen or the code was misread.
  • 😕 Unclear: you can't tell what it means or why it matters.
  • 👀 Right, not acting: correct, but intended, out of scope for this PR, a known risk, or too minor.

🤖 Bits Code Review · Open Bits AI session

This branch has not been deployed

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

Labels

AI human_review:mandatory Human review required — see PR description sphinx:critical Sphinx: critical — human review required test:asan Run CI tests with AddressSanitizer configuration test:fuzz test:release Run CI tests with release configuration test:reliability test:tsan Run CI tests with ThreadSanitizer configuration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants