Skip to content

Code coverage for Java Profiler - #858

Draft
zhengyu123 wants to merge 5 commits into
mainfrom
zgu/code-coverage
Draft

zhengyu123 wants to merge 5 commits into
mainfrom
zgu/code-coverage

Conversation

@zhengyu123

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: [JIRA-XXXX]

Unsure? Have a question? Request a review!

@datadog-prod-us1-6

datadog-prod-us1-6 Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Pipelines

✨ Unblock PR with BitsAI

❌ Errors

Your PR has failed checks. Please review the issues below and take necessary action before merging.

🚦 1 Pipeline job failed

DataDog/java-profiler | gtest-release-arm64 — 🔧 Needs a code fix, caused by this PR

View more details · View in GitLab

Useful? React with 👍 / 👎

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

@dd-octo-sts

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

Copy link
Copy Markdown
Contributor

CI Test Results

Run: #38556206745 | Commit: e233b54 | Duration: 18m 11s (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-14 11:46:00 UTC

zhengyu123 and others added 2 commits October 12, 2026 16:23
…rage tasks

- Package the `coverage` native library jar and consumable configuration
  when -PenableCoverage is set, so :ddprof-test:testCoverage can resolve it
  (still excluded from publishing).
- gtestCoverageReport now also depends on :ddprof-test:testCoverage and
  merges the gtest and Java-test .gcda data into one gcovr report; negative
  hit counts are warned about instead of failing the report.
- Build the coverage config with -fprofile-update=atomic so concurrent
  profiler threads don't corrupt gcov counters, and link it on Linux with
  -Wl,-z,nodelete like the debug config.
- Clear stale .gcda files before each gtestCoverage_<test> and testCoverage
  run, and derive the gcov tool from the configured compiler instead of
  the gcov on PATH.
- Enable JaCoCo on testDebug/testSlowDebug only when jacocoTestReport is
  requested (drops -PdisableJacoco). When a coverage report is requested,
  test failures are deferred rather than ignored: the report is generated,
  then the build fails listing the failed test tasks.
- Add NativeBuildConfig so debug-only tests also run against the coverage
  build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dd-octo-sts

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

Copy link
Copy Markdown
Contributor

❌ 39 passed, 1 failed out of 40 expected configurations

Test Matrix

Platform JDK 8 JDK 11 JDK 17 JDK 21 JDK 25
glibc-x64-hotspot ✅ ✅ ✅ ✅ ✅
glibc-x64-openj9 ✅ ✅ ✅ ✅ ✅
glibc-arm64-hotspot ✅ ✅ ✅ ✅ ✅
glibc-arm64-openj9 ✅ ✅ ✅ ✅ ✅
musl-x64-hotspot ✅ ✅ ✅ ✅ ❌
musl-x64-openj9 ✅ ✅ ✅ ✅ ✅
musl-arm64-hotspot ✅ ✅ ✅ ✅ ✅
musl-arm64-openj9 ✅ ✅ ✅ ✅ ✅

Failure Details

musl-x64-hotspot-jdk25

Tracer+profiler:

"  This may indicate tracer is not capturing any requests"
""
"[7/8] Checking for unexpected events..."
"  ✓ No unexpected events found"
""
"[8/8] Scenario-specific validation (ddprof_with_tracer)..."
"  Validating tracer+profiler scenario..."
"  ✓ Tracer+profiler scenario checks passed"
""
"=== Validation Summary ==="
"ExecutionSample:            0.0 events (datadog.ExecutionSample)"
"Stack traces:               0.0 samples"
"Thread diversity:           0.0 threads"
"Allocation samples:         0 events (jdk.ObjectAllocationSample)"
"ThreadAllocationStatistics: 48 events"
""
"VALIDATION_FAILED: One or more checks did not pass"

Script executed successfully: 425 commands
VALIDATION_FAILED: Validation checks did not pass

Links

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