Skip to content

Restore Oracle JDK 8 profiler controller tests - #13185

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
masterfrom
bdu/restore-oracle-profiling-tests
Nov 4, 2026
Merged

gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
masterfrom
bdu/restore-oracle-profiling-tests

Conversation

@bric3

@bric3 bric3 commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

What Does This Do

Restore execution of the Oracle JDK 8 profiler controller tests, on Oracle 8 JVM.

Motivation

The standard Oracle profiler controller test tasks have been prevented from executing by build configuration for a long time, since 1 March 2022. This leaves the legacy Oracle JFR implementation without its intended Oracle JDK 8 test coverage.

The Gradle scan report shows :dd-java-agent:agent-profiling:profiling-controller-oracle:test run with Oracle JVM 1.8.0_503-b01 was skipped with the reason 'Test JDK is allowed or forced JDK' not satisfied.

Additional Notes

Previously this profiler project used a Java 11 compiler to access the public jdk.jfr classes while emitting Java 8 bytecode for distributions with backported JFR.

The OpenJDK profiler controller configured this explicitly as well via

configureCompiler(it, 11, JavaVersion.VERSION_1_8, "Need access to jdk.jfr package")

But the Oracle profiler controller specifically targets the older and legacy JFR way through the com.oracle.jrockit:type=FlightRecorder MBean ; i.e. it affects only for Oracle JVM pre u262.
And it turns out that its production or test sources do not reference jdk.jfr classes, so the default compiler configuration already meets the dd-trace-java requirements, in particular today where compilation happens on JDK25 (the JDK of the Gradle Dameon) with --release 8.

Removing the empty source set preserves that configuration.

Timeline

Date Change and effect on Oracle tests
2021-03-09 e089427, #2466, introduced the guard onlyIf { it.name.contains('ORACLE8') }.
At this time test tasks were generated and task names such as testJavaORACLE8Generated and forkedTestJavaORACLE8Generated satisfied it.
2022-03-01 a16d922 replaced generated tasks with a testJvm launcher override on ordinary test tasks. However, the previous task-name guard skipped these test tasks, even with Oracle JDK 8 selected.
This is when the standard test tasks became blocked.
2025-11-10 4255dc0, #9892, migrated test jvm configuration to testJvmConstraints and addSourceSetFor.
Given the Oracle profiler controller had the same project as the OpenJDK profiler controller, that is compilation of Java 11 (to access JFR API definitions) but still targeting Java 8 (test were compiled with Java 8 applyForTestSources = false).
Oracle profiler controller was then migrated the same way as OpenJDK profiler controller that is with addSourceSetFor(VERSION_11), some comment survived though like the one with Zulu 8, despite having no src/main/java11 sources or direct jdk.jfr references.
The ORACLE8 guard was then preceded by another on Java version check (tracerJava { addSourceSetFor() }, which is not at fault here).
2026-06-10 640b115, #11612, made the test constraints plugin a pure "binary" plugin. No change in behavior.

Contributor Checklist

@bric3 bric3 added tag: ai generated Largely based on code generated by an AI or LLM comp: profiling Profiling type: bug fix Bug fix tag: no release notes Changes to exclude from release notes run-tests: oracle8 Run tests using Oracle 8 JDK labels Nov 3, 2026 — with ChatGPT Codex Connector
@datadog-prod-us1-6

This comment has been minimized.

@dd-octo-sts

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

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 13.99 s 13.86 s [+0.2%; +1.6%] (maybe worse)
startup:insecure-bank:tracing:Agent 12.86 s 12.92 s [-1.2%; +0.3%] (no difference)
startup:petclinic:appsec:Agent 16.64 s 16.99 s [-6.4%; +2.2%] (no difference)
startup:petclinic:iast:Agent 16.84 s 17.05 s [-2.0%; -0.6%] (maybe better)
startup:petclinic:profiling:Agent 16.55 s 16.74 s [-2.1%; -0.2%] (maybe better)
startup:petclinic:sca:Agent 17.03 s 16.95 s [-0.4%; +1.3%] (no difference)
startup:petclinic:tracing:Agent 16.09 s 16.34 s [-2.5%; -0.6%] (maybe better)

Commit: db1984dc · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

@bric3
bric3 marked this pull request as ready for review November 3, 2026 20:32
@bric3
bric3 requested review from a team as code owners November 3, 2026 20:32
@bric3
bric3 requested review from dougqh and jbachorik and removed request for a team November 3, 2026 20:32
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-03T20:37:06.059530Z a565fa4 Draft marked ready
🔒 Security Review ✅ Completed 2026-11-03T20:36:16.818419Z a565fa4 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@bric3
bric3 requested review from a team and PerfectSlayer November 3, 2026 20:32
@bric3 bric3 changed the title Restore Oracle JDK 8 profiler tests Restore Oracle JDK 8 profiler controller tests Nov 3, 2026

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bits Code Review: PASS

More details

The configuration restores Oracle JDK 8 test eligibility while preserving Java 8 compilation. Actual profiler test execution remains unverified because Oracle JDK 8 is unavailable in the environment.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit a565fa4

@PerfectSlayer PerfectSlayer left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

There is a run label but I don't think it's working, and I could not find the job run from PR check. Was it tested seperately?

@bric3

bric3 commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

@PerfectSlayer I asked agent to open PR and generate description, that's why! But you're right, label bon't work. At least they are informative.
Any I pushed an empty commit with the needed text.

Tests ran:

:dd-java-agent:agent-profiling:profiling-controller:test | 4.639s |  

@PerfectSlayer PerfectSlayer left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the fix. I'm starting a wider investigation as part of incident follow up.
We can run them through agents later but I want to focus on root cause first.

@jbachorik jbachorik 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.

Thanks for catching this!

@bric3

bric3 commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

@jbachorik thanks goes to @PerfectSlayer as he is the one that caught this.

@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit efd33e6 into master Nov 4, 2026
776 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the bdu/restore-oracle-profiling-tests branch November 4, 2026 15:47
@github-actions github-actions Bot added this to the 1.69.0 milestone Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: profiling Profiling run-tests: oracle8 Run tests using Oracle 8 JDK tag: ai generated Largely based on code generated by an AI or LLM tag: no release notes Changes to exclude from release notes type: bug fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants