feat: emit TaskBlock events for native socket I/O#666
Draft
kaahos wants to merge 17 commits into
Draft
Conversation
This comment has been minimized.
This comment has been minimized.
Contributor
CI Test ResultsRun: #29573019248 | Commit:
Status Overview
Legend: ✅ passed | ❌ failed | ⚪ skipped | 🚫 cancelled Summary: Total: 32 | Passed: 32 | Failed: 0 Updated: 2026-07-17 10:37:48 UTC |
kaahos
force-pushed
the
paul.fournillon/taskblock-native-io
branch
2 times, most recently
from
July 16, 2026 15:29
cfa4870 to
7f00fae
Compare
kaahos
force-pushed
the
paul.fournillon/taskblock-native-io
branch
2 times, most recently
from
July 17, 2026 08:36
a4f7ef8 to
5de84e2
Compare
kaahos
force-pushed
the
paul.fournillon/taskblock-native-io
branch
from
July 17, 2026 09:44
5de84e2 to
c4a2496
Compare
Contributor
Benchmark Results (commit 4077c10)Pipeline: https://gitlab.ddbuild.io/DataDog/apm-reliability/benchmarking-platform/-/pipelines/125241502 Commit:
|
| Benchmark | JDK | Latest | Dev | Δ (dev vs latest) | Issues L/D |
|---|---|---|---|---|---|
| akka-uct | 21 | ✅ 10318 ms (21 iters) | ✅ 10297 ms (21 iters) | ≈ -0.2% (±11.5%) | — / — |
| akka-uct | 25 | ✅ 8877 ms (24 iters) | ✅ 8872 ms (24 iters) | ≈ -0.1% (±10%) | — / — |
| finagle-chirper | 21 | ✅ 5924 ms (33 iters) | ✅ 6023 ms (33 iters) | ≈ +1.7% (±25.7%) | |
| finagle-chirper | 25 | ✅ 5440 ms (36 iters) | ✅ 5447 ms (36 iters) | ≈ +0.1% (±24%) | |
| fj-kmeans | 25 | ✅ 2819 ms (66 iters) | ✅ 2768 ms (68 iters) | ≈ -1.8% (±2.7%) | — / — |
| future-genetic | 21 | ✅ 2100 ms (89 iters) | ✅ 2118 ms (87 iters) | ≈ +0.9% (±2.8%) | — / — |
| future-genetic | 25 | ✅ 2072 ms (89 iters) | ✅ 2005 ms (93 iters) | 🟢 -3.2% | — / — |
| naive-bayes | 25 | ✅ 990 ms (172 iters) | ✅ 1017 ms (169 iters) | ≈ +2.7% (±31.9%) | — / — |
| reactors | 21 | ✅ 16610 ms (15 iters) | ✅ 16761 ms (15 iters) | ≈ +0.9% (±8%) | — / — |
| reactors | 25 | ✅ 18536 ms (15 iters) | ✅ 18473 ms (15 iters) | ≈ -0.3% (±2.8%) | — / — |
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 | 2000 / 2002 | ✅ / ✅ | ✅ / ✅ |
| akka-uct | 25 | ✅ / ✅ | ✅ / ✅ | 1 / 4 | 2240 / 2285 | ✅ / ✅ | ✅ / ✅ |
| finagle-chirper | 21 | ✅ / ✅ | ✅ / ✅ | 3 / 4 | 8783 / 8895 | ✅ / ✅ | ✅ / ✅ |
| finagle-chirper | 25 | ✅ / ✅ | ✅ / ✅ | 2 / 3 | 8381 / 7985 | ✅ / ✅ | ✅ / ✅ |
| fj-kmeans | 21 | ✅ / ✅ | ✅ / ✅ | 4 / ✅ | 1321 / ✅ | ✅ / ✅ | ✅ / ✅ |
| fj-kmeans | 25 | ✅ / ✅ | ✅ / ✅ | 2 / 3 | 1268 / 1276 | ✅ / ✅ | ✅ / ✅ |
| future-genetic | 21 | ✅ / ✅ | ✅ / ✅ | ✅ / 2 | 2969 / 2966 | ✅ / ✅ | ✅ / ✅ |
| future-genetic | 25 | ✅ / ✅ | ✅ / ✅ | 3 / 1 | 2828 / 2888 | ✅ / ✅ | ✅ / ✅ |
| naive-bayes | 21 | ✅ / ✅ | ✅ / ✅ | ✅ / ✅ | ✅ / ✅ | ✅ / ✅ | ✅ / ✅ |
| naive-bayes | 25 | ✅ / ✅ | ✅ / ✅ | 1 / 4 | 3471 / 3500 | ✅ / ✅ | ✅ / ✅ |
| reactors | 21 | ✅ / ✅ | ✅ / ✅ | ✅ / 1 | 1675 / 1607 | ✅ / ✅ | ✅ / ✅ |
| reactors | 25 | ✅ / ✅ | ✅ / ✅ | 1 / ✅ | 1935 / 1843 | ✅ / ✅ | ✅ / ✅ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?:
Adds native socket I/O TaskBlock instrumentation on Linux by interposing blocking socket APIs, classifying socket file descriptors, and recording synchronous TaskBlock events for owned native I/O waits.
Motivation:
Blocking native I/O is a major source of wall-clock time. Recording these intervals directly avoids intentionally signaling threads while they are blocked in recognized socket operations.
Additional Notes:
This PR includes Linux native interposition, socket/Fd classification, lifecycle handling for unloadable libraries, integration tests, and a native socket I/O benchmark.
How to test the change?:
Automated coverage includes native unit tests for interposition, socket sampling, native block handling, thread-filter suppression, and Java integration tests for native socket TaskBlock behavior.
./.claude/commands/build-and-summarize testDebugNative socket integration tests are Linux-specific and skip on macOS.
For Datadog employees:
dd:platform-security-reviewskill, or file a request via the PSEC review form).bewairealso runs automatically on every PR.