Skip to content

Add USDT output for native allocation profiling - #878

Draft
jbachorik wants to merge 5 commits into
mainfrom
emit-the-native
Draft

jbachorik wants to merge 5 commits into
mainfrom
emit-the-native

Conversation

@jbachorik

@jbachorik jbachorik commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

What does this PR do?:

Adds a semaphored ddheap:alloc(address, size, weighted_bytes) USDT probe for native-memory allocation samples on Linux. Native-memory profiling now emits both JFR and USDT by default on Linux; nativememoutput=jfr|usdt|both can disable either destination. On unsupported platforms, explicit usdt warns and disables native-memory profiling, while explicit both warns and continues with JFR only. The packaged native libraries are verified for the expected probe metadata.

Motivation:

Allow external eBPF profilers to consume sampled native allocations without replacing the existing JFR output.

Additional Notes:

USDT output is Linux-only and allocation-only. Non-Linux builds retain JFR as their implicit default.

How to test the change?:

  • :ddprof-lib:gtestDebug_arguments_ut — 29/29 passed on macOS and Linux
  • :ddprof-lib:gtestDebug_mallocTracer_usdt_ut — 14/14 passed on macOS; Linux-specific USDT coverage passed before the fallback-only follow-up
  • :ddprof-lib:verifyNativeAllocationUsdtRelease — passed on Linux
  • spotlessApply — passed
  • Full testDebug reached 233 Java tests; only the known unrelated TlsPrimingTest and VirtualThreadWallClockTest failed

For Datadog employees:

  • If this PR touches code that signs or publishes builds or packages, or handles credentials of any kind, I have requested a security review.
  • This PR does not touch any of that.
  • JIRA: [JIRA-XXXX]

@dd-octo-sts

dd-octo-sts Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

CI Test Results

Run: #39450972274 | Commit: 40725a4 | Duration: 18m 0s (longest job)

✅ All 32 test jobs passed

Status Overview

JDK glibc-aarch64/debug glibc-amd64/debug musl-aarch64/debug musl-amd64/debug
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: 32 | Passed: 32 | Failed: 0


Updated: 2026-10-20 16:05:02 UTC

@dd-octo-sts

dd-octo-sts Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

✅ All 40 integration tests passed

📊 Dashboard · 👷 Pipeline · 📦 08ebfd8c

@dd-octo-sts

dd-octo-sts Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Reliability & Chaos Results

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

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant