Skip to content

Java profiler remote enablement - #907

Draft
zhengyu123 wants to merge 10 commits into
mainfrom
zgu/remote_enablement
Draft

zhengyu123 wants to merge 10 commits into
mainfrom
zgu/remote_enablement

Conversation

@zhengyu123

@zhengyu123 zhengyu123 commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?:

Motivation:

Additional Notes:

How to test the change?:

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-16142

Unsure? Have a question? Request a review!

@dd-octo-sts

dd-octo-sts Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

CI Test Results

Run: #41566122030 | Commit: ca5c787 | Duration: 23m 6s (longest job)

❌ 2 of 32 test jobs failed

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

❌ Failing tests

Test Cells Message
JvmtiEventTimingTest.agentOnLoadSeesNativeBindingsBeforeFirstStart__ musl-11-librca-debug-aarch64, musl-11-librca-debug-amd64 VMStructs::NativeMethodBind never resolved getMemoryUsage0: NATIVE_METHOD_BIND was not enabled when VMInit bound it, so

Retried 2 of 32 cells.

Failed Jobs

Summary: Total: 32 | Passed: 30 | Failed: 2


Updated: 2026-11-03 02:53:34 UTC

@dd-octo-sts

dd-octo-sts Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

✅ All 40 integration tests passed

📊 Dashboard · 👷 Pipeline · 📦 d15a7fc8

@datadog-datadog-prod-us1

This comment has been minimized.

zhengyu123 and others added 7 commits October 27, 2026 18:00
Resolved the include conflict in hotspot/jitCodeCache.cpp by keeping both
common.h (TEST_LOG, this branch) and counters.h (Counters::, main).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- CallTraceStorage allocates no tables until acquire(): the profiler holds
  none before the first start(). processTraces() on released storage hands
  the processor only the dropped-trace placeholder instead of crashing.
- start(): the nativemem-only failure path and the stack-buffer calloc
  failure path now close thread registration and release recording memory,
  like the "no engine activated" path.
- Set DebugNonSafepoints at agent load on every HotSpot; COMPILED_METHOD_LOAD
  is only enabled on the first start(), and its replay cannot add debug info
  to code compiled before then.
- recordTrace0()/recordQueueEnd0() do nothing while the profiler is idle, so
  they no longer re-allocate the dictionaries stop() released.
- patch_pthread_create() re-checks already patched libraries only when
  glibc's unload count (dlpi_subs) changed since the last full pass.
- Move the per-platform MallocHooker patch/unpatch into mallocTracer_linux.cpp
  and mallocTracer_macos.cpp.
- Add missing Datadog copyright lines.
- NativeMem::logLive() prints live bytes per category (total in KB) after
  Profiler::init() and before Profiler::start(); ProfilerLifecycleTest prints
  its totals in KB.
- Update the affected architecture docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@zhengyu123 zhengyu123 changed the title Java profiler remote enablement (minimize memory footprint in idle mode) Java profiler remote enablement Nov 3, 2026

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