Skip to content

style(java): apply configured Java formatting [PROF-16537] - #957

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
mainfrom
paul.fournillon/prof-16537-java-formatting
Nov 10, 2026
Merged

gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
mainfrom
paul.fournillon/prof-16537-java-formatting

Conversation

@kaahos

@kaahos kaahos commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?:
Apply the configured Google Java Format 1.30.0 output to Java sources in ddprof-lib, ddprof-stresstest, ddprof-test and ddprof-test-tracer. This PR is based on #955 rather than main.

Motivation:
The Java formatting gate restored by #955 rejects the existing source layout. Separating the migration lets reviewers inspect the build repair without the mechanical source diff. This PR changes no formatting scope, exclusions or checks.

Additional Notes:

How to test the change?:
Use a build JDK of 21 or newer. Run from this branch, which includes the build repair from #955:

./.claude/commands/build-and-summarize spotlessCheck --rerun-tasks --no-build-cache --max-workers=2
./.claude/commands/build-and-summarize -p build-logic :conventions:test --rerun-tasks --no-build-cache --max-workers=2
  • Run the root formatting check without file scoping or additional exclusions.
  • The convention suite verifies formatter execution and Java 8 bytecode compatibility.
  • These checks do not replace profiler runtime or sanitizer testing for behavioral changes.

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

Unsure? Have a question? Request a review!

@datadog-datadog-prod-us1-2

This comment has been minimized.

@dd-octo-sts

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

Copy link
Copy Markdown
Contributor

Scan-Build Report

User:runner@runnervmwuk1x
Working Directory:/home/runner/work/java-profiler/java-profiler/ddprof-lib/src/test/make
Command Line:make -j4 all
Clang Version:Ubuntu clang version 21.1.8 (6ubuntu1)
Date:Tue Nov 10 17:20:21 2026

Bug Summary

Bug TypeQuantityDisplay?
All Bugs2
Logic error
Dereference of null pointer1
Unused code
Dead initialization1

Filter Results by File

Reports

Bug Group Bug Type ▾ File Function/Method Line Path Length
Unused codeDead initializationreferenceChains.cppapplyOomRamp4971
Logic errorDereference of null pointerperfEvents_linux.cppunregisterThread72026

@dd-octo-sts

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

Copy link
Copy Markdown
Contributor

CI Test Results

Run: #43441338372 | Commit: 0cf1c5f | Duration: 20m 25s (longest job)

✅ All 108 test jobs passed

Status Overview

JDK glibc-aarch64/asan glibc-aarch64/debug glibc-aarch64/release glibc-aarch64/tsan glibc-amd64/asan glibc-amd64/debug glibc-amd64/release glibc-amd64/tsan musl-aarch64/debug musl-aarch64/release musl-amd64/debug musl-amd64/release
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: 108 | Passed: 108 | Failed: 0


Updated: 2026-11-13 14:57:30 UTC

@kaahos

kaahos commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

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

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T14:19:08.653325Z b1dbc6e 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: eb06bd345f

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@kaahos kaahos added test:release Run CI tests with release configuration test:asan Run CI tests with AddressSanitizer configuration test:tsan Run CI tests with ThreadSanitizer configuration test:fuzz test:reliability labels Nov 9, 2026
@kaahos
kaahos added this pull request to stack #966 November 10, 2026 09:15
// For this test, we verify that contention measurement works
assertTrue(currentResult.totalAttempts > 0, "Should measure total attempts");
assertTrue(
currentResult.totalAttempts > 0
// CPU burning pattern that ensures we get profiling samples
long sink = 0;
for (int i = 0; i < 100000; i++) {
sink += i * threadId;
* (service.version). Must not be null. Examples: "1.0.0", "2.3.4"
* @param tracerVersion the version of the tracer as defined by OpenTelemetry semantic conventions
* (telemetry.sdk.version). Must not be null. Examples: "3.5.0", "4.2.0"
* @param attributeKeys the thread-context attribute key names whose per-thread values are
*/
public boolean isActive() {
return libraryLoadResult.succeeded;
public double getFloatFlag(String name) {
@kaahos
kaahos force-pushed the paul.fournillon/prof-16537-java-formatting branch from eb06bd3 to b1dbc6e Compare November 10, 2026 13:36
@dd-octo-sts

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

Copy link
Copy Markdown
Contributor

✅ All 40 integration tests passed

📊 Dashboard · 👷 Pipeline · 📦 2c405484

@kaahos
kaahos marked this pull request as ready for review November 10, 2026 14:17
@kaahos
kaahos requested a review from a team as a code owner November 10, 2026 14:17
@dd-octo-sts

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

Copy link
Copy Markdown
Contributor

Reliability & Chaos Results

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

@datadog-datadog-prod-us1-2 datadog-datadog-prod-us1-2 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

Executable Java tokens are preserved apart from equivalent modifier ordering, and removed imports are unused or redundant. Formatting-gate and runtime execution remain unverified.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit b1dbc6e

@kaahos
kaahos force-pushed the paul.fournillon/prof-16537-java-formatting branch from b1dbc6e to 2c40548 Compare November 10, 2026 15:23
@kaahos

kaahos commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

/gitlab retry-pipeline

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-11-10 15:35:41 UTC ℹ️ Start processing command /gitlab retry-pipeline


2026-11-10 15:35:49 UTC

All failed jobs have been retried successfully. The following job IDs have been retried: 2234892830

@kaahos

kaahos commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-11-10 16:47:29 UTC ℹ️ Start processing command /merge
If you need support, contact us on Slack #devflow!


2026-11-10 16:47:31 UTC ℹ️ MergeQueue: Stack detected — automatically merging the entire stack.
If you need support, contact us on Slack #devflow!


2026-11-10 16:47:37 UTC ℹ️ Devflow: Merging stacked PRs in the following order:

  1. [fix(build): register Java formatting lazily and update formatter PROF-16537 (fix(build): register Java formatting lazily and update formatter [PROF-16537] #955)](fix(build): register Java formatting lazily and update formatter [PROF-16537] #955)
  2. [style(java): apply configured Java formatting PROF-16537 (style(java): apply configured Java formatting [PROF-16537] #957)](style(java): apply configured Java formatting [PROF-16537] #957)

Progress updates will be sent here directly.
If you need support, contact us on Slack #devflow!


2026-11-10 16:47:38 UTC ℹ️ Devflow: Merging [fix(build): register Java formatting lazily and update formatter PROF-16537 (#955)](#955)...
If you need support, contact us on Slack #devflow!


2026-11-10 16:47:41 UTC ❌ MergeQueue

PR already in the queue with status in_progress

If you need support, contact us on Slack #devflow with those details!


2026-11-10 16:47:42 UTC ❌ MergeQueue

The following PRs won't be merged. The current stack is:

If you need support, contact us on Slack #devflow with those details!


⏳ Processing

Base automatically changed from paul.fournillon/fix-prof-16537-spotless to main November 10, 2026 17:17
@kaahos
kaahos force-pushed the paul.fournillon/prof-16537-java-formatting branch from 2c40548 to debf2b1 Compare November 10, 2026 17:17
@kaahos

kaahos commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

/merge --cancel

@gh-worker-devflow-routing-ef8351

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-11-10 17:18:24 UTC ℹ️ Start processing command /merge --cancel
If you need support, contact us on Slack #devflow!


2026-11-10 17:18:27 UTC ❌ Failure

No merge in progress was found for this stack, so there is nothing to cancel.

To get help about command usage, write /merge --help

If you need support, contact us on Slack #devflow with those details!

@kaahos

kaahos commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-11-10 17:18:46 UTC ℹ️ Start processing command /merge


2026-11-10 17:18:50 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in main is approximately 53m (p90).


2026-11-10 17:49:52 UTC ℹ️ MergeQueue: This merge request was merged

@datadog-datadog-prod-us1-2 datadog-datadog-prod-us1-2 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 reviewer’s token comparison found equivalent code bodies after accounting for import cleanup and modifier ordering. Build and runtime execution remain unverified.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit debf2b1

@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 0cf1c5f into main Nov 10, 2026
195 of 210 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the paul.fournillon/prof-16537-java-formatting branch November 10, 2026 17:49
@github-actions github-actions Bot added this to the 1.53.0 milestone Nov 10, 2026
zhengyu123 added a commit that referenced this pull request Nov 11, 2026
Four Java files conflicted with main's Java formatting change (#957): JavaProfiler.java, JVMAccessTest.java, JavaProfilerApiSurfaceTest.java and QueueTimeTest.java. Each takes main's formatting, with this branch's changes re-applied on top: the two NativeMem test seams, the nativeMem API-surface test, the agent-argument start in JVMAccessTest, and the null-name QueueTime test.

The other Java files this branch changed or added were reformatted with spotlessApply so that spotlessCheck passes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mergequeue-status: done no-release-notes test:asan Run CI tests with AddressSanitizer configuration test:fuzz test:release Run CI tests with release configuration test:reliability test:tsan Run CI tests with ThreadSanitizer configuration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants