Skip to content

Add disabled regression test for unprimed native threads - #712

Open
jbachorik wants to merge 3 commits into
mainfrom
jb/integ_tests_unknown
Open

Add disabled regression test for unprimed native threads#712
jbachorik wants to merge 3 commits into
mainfrom
jb/integ_tests_unknown

Conversation

@jbachorik

@jbachorik jbachorik commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do?:

  • Adds disabled coverage for synthetic frames from pre-existing JVM native threads; re-enable it when thread priming is reintroduced.
  • Includes an auxiliary macOS native compilation and linking fix.

Motivation:

Existing compiler and GC threads expose missing thread priming through sole synthetic frames. The macOS change also ensures Apple Clang targets the JVM architecture under Rosetta.

Additional Notes:

NativeThreadPrimingTest is intentionally disabled until thread priming is reintroduced.

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.
  • This PR doesn't touch any of that.

Copilot AI review requested due to automatic review settings August 3, 2026 15:31
@jbachorik
jbachorik force-pushed the jb/integ_tests_unknown branch from 9026837 to 314e3e6 Compare August 3, 2026 15:34
@jbachorik jbachorik changed the title Rebase reference-chain work and fix macOS builds Fix macOS native build and cover thread priming Aug 3, 2026

This comment was marked as outdated.

Copilot AI review requested due to automatic review settings August 3, 2026 15:36
@dd-octo-sts

dd-octo-sts Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Scan-Build Report

User:runner@runnervmvrwv9
Working Directory:/home/runner/work/java-profiler/java-profiler/ddprof-lib/src/test/make
Command Line:make -j4 all
Clang Version:Ubuntu clang version 18.1.3 (1ubuntu1)
Date:Tue Aug 4 14:26:07 2026

Bug Summary

Bug TypeQuantityDisplay?
All Bugs1
Logic error
Dereference of null pointer1

Reports

Bug Group Bug Type ▾ File Function/Method Line Path Length
Logic errorDereference of null pointerprofiler.hfindLibraryByAddress51713

@jbachorik
jbachorik force-pushed the jb/integ_tests_unknown branch from 314e3e6 to 778a07d Compare August 3, 2026 15:37
@jbachorik jbachorik changed the title Fix macOS native build and cover thread priming Add disabled regression test for unprimed native threads Aug 3, 2026

Copilot AI 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.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings August 3, 2026 15:39
@jbachorik
jbachorik marked this pull request as ready for review August 3, 2026 15:39
@jbachorik
jbachorik requested a review from a team as a code owner August 3, 2026 15:39

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b8433098ce

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

Copilot AI 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.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

Suppressed comments (1)

ddprof-test/src/test/java/com/datadoghq/profiler/cpu/NativeThreadPrimingTest.java:40

  • When this test is eventually re-enabled, it will still be invoked on J9 and Zing unless you add an explicit platform gate. This is risky because the CStackInjector’s @ValueSource filtering falls back to the first declared value when none are “safe” (so J9 would still run with cstack=vm), and Zing forces cstack=no, making the test semantics invalid. Consider overriding isPlatformSupported() now to skip these JVMs so the future re-enable doesn’t introduce CI flakes/hangs.
    public NativeThreadPrimingTest(@CStack String cstack) {
        super(cstack);
    }

    @TestTemplate

@dd-octo-sts

dd-octo-sts Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

CI Test Results

Run: #30918733018 | Commit: ce79ec3 | Duration: 3h 0m 15s (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: 31 | Failed: 0 | Cancelled: 1


Updated: 2026-08-04 18:22:40 UTC

@dd-octo-sts

dd-octo-sts Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Benchmark Results (commit b843309)

Pipeline: https://gitlab.ddbuild.io/DataDog/apm-reliability/benchmarking-platform/-/pipelines/128634899 Commit: b8433098ce60030f019bfc14ffec33b901ab6d29

✅ Within expected boundaries

No significant runtime deltas (all within run-to-run noise) and no internal-counter outliers.

Runtime details (per benchmark × JDK)
Benchmark JDK Latest Dev Δ (dev vs latest) Issues L/D
akka-uct 21 ✅ 10284 ms (21 iters) ✅ 10368 ms (21 iters) ≈ +0.8% (±11%) — / —
akka-uct 25 ✅ 8900 ms (24 iters) ✅ 8853 ms (24 iters) ≈ -0.5% (±9.8%) — / —
finagle-chirper 21 ✅ 6014 ms (33 iters) ✅ 5977 ms (33 iters) ≈ -0.6% (±25.2%) ⚠️ W:3 / ⚠️ W:4
finagle-chirper 25 ✅ 5472 ms (36 iters) ✅ 5488 ms (36 iters) ≈ +0.3% (±24.6%) ⚠️ W:3 / ⚠️ W:3
fj-kmeans 21 ✅ 2670 ms (69 iters) ✅ 2731 ms (68 iters) ≈ +2.3% (±2.7%) — / —
fj-kmeans 25 ✅ 2759 ms (67 iters) ✅ 2828 ms (66 iters) ≈ +2.5% (±2.7%) — / —
future-genetic 21 ✅ 2111 ms (88 iters) ✅ 2105 ms (88 iters) ≈ -0.3% (±2.7%) — / —
future-genetic 25 ✅ 2099 ms (88 iters) ✅ 2132 ms (87 iters) ≈ +1.6% (±2.5%) — / —
naive-bayes 21 ✅ 1337 ms (129 iters) ✅ 1267 ms (135 iters) ≈ -5.2% (±31.7%) — / —
naive-bayes 25 ✅ 1008 ms (170 iters) ✅ 1019 ms (168 iters) ≈ +1.1% (±31.7%) — / —
reactors 25 ✅ 18460 ms (15 iters) ✅ 18514 ms (15 iters) ≈ +0.3% (±4.4%) — / —
Internal counter details (ddprof)

ddprof internal counters, latest / dev (✅ = 0, · = unavailable):

Benchmark JDK Dropped rec Dropped jvmti Dropped trace Skipped WC AGCT fail Unwind fail
akka-uct 21 ✅ / ✅ ✅ / ✅ 2 / 2 2029 / 2024 ✅ / ✅ ✅ / ✅
akka-uct 25 ✅ / ✅ ✅ / ✅ 3 / 4 2195 / 2193 ✅ / ✅ ✅ / ✅
finagle-chirper 21 ✅ / ✅ ✅ / ✅ 3 / 5 8677 / 8519 ✅ / ✅ ✅ / ✅
finagle-chirper 25 ✅ / ✅ ✅ / ✅ 1 / 2 8660 / 8634 ✅ / ✅ ✅ / ✅
fj-kmeans 21 ✅ / ✅ ✅ / ✅ 3 / 2 1259 / 1281 ✅ / ✅ ✅ / ✅
fj-kmeans 25 ✅ / ✅ ✅ / ✅ 2 / 2 1270 / 1276 ✅ / ✅ ✅ / ✅
future-genetic 21 ✅ / ✅ ✅ / ✅ 1 / 2 2900 / 2953 ✅ / ✅ ✅ / ✅
future-genetic 25 ✅ / ✅ ✅ / ✅ 1 / ✅ 2866 / 2939 ✅ / ✅ ✅ / ✅
naive-bayes 21 ✅ / ✅ ✅ / ✅ 4 / 3 3557 / 3513 ✅ / ✅ ✅ / ✅
naive-bayes 25 ✅ / ✅ ✅ / ✅ 3 / 3 3519 / 3506 ✅ / ✅ ✅ / ✅
reactors 21 ✅ / ✅ ✅ / ✅ ✅ / ✅ ✅ / ✅ ✅ / ✅ ✅ / ✅
reactors 25 ✅ / ✅ ✅ / ✅ 1 / ✅ 1882 / 1808 ✅ / ✅ ✅ / ✅

Copilot AI review requested due to automatic review settings August 4, 2026 11:03

Copilot AI 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.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

Suppressed comments (1)

ddprof-test/src/test/java/com/datadoghq/profiler/cpu/NativeThreadPrimingTest.java:62

  • STACK_TRACE_STRING accessors and members can be null in this test suite (see e.g. ClinitResolutionTest / VtableReceiverFrameTest). Here the code assumes both the accessor and the returned stack trace are non-null, which can lead to intermittent NPEs when iterating events.

Consider skipping iterables where the accessor is null, and guarding stackTrace before calling contains() / matches().

                IMemberAccessor<String, IItem> frameAccessor =
                        JdkAttributes.STACK_TRACE_STRING.getAccessor(cpuSamples.getType());
                for (IItem sample : cpuSamples) {
                    totalSamples++;
                    String stackTrace = frameAccessor.getMember(sample);

Copilot AI review requested due to automatic review settings August 4, 2026 11:08

Copilot AI 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.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

Suppressed comments (3)

build-logic/conventions/src/main/kotlin/com/datadoghq/native/tasks/NativeCompileTask.kt:266

  • architectureArgs is always computed on macOS and then injected into the compiler command line. This uses Apple Clang’s -arch flag and will fail for compilers/linkers that don’t support it (e.g., Homebrew GCC like g++-13, or other non-Clang toolchains selected via -Pnative.forceCompiler). Consider gating the injection based on the selected compiler executable name so macOS builds don’t break when a non-Clang compiler is used.
        // Build base compiler arguments with convenience properties
        val baseArgs = (architectureArgs + compilerArgs.get()).toMutableList()

build-logic/conventions/src/main/kotlin/com/datadoghq/native/tasks/NativeLinkTask.kt:284

  • architectureArgs adds Apple Clang’s -arch flag unconditionally on macOS. If the linker is not a Clang driver (e.g., Homebrew GCC selected via -Pnative.forceCompiler), the link step will fail with an “unknown option: -arch” style error. Consider only adding these flags when the linker executable is a Clang-like driver (or Apple’s g++ wrapper).
        val cmdLine = mutableListOf<String>().apply {
            add(linker.get())
            add(sharedFlag)
            addAll(architectureArgs)
            addAll(objectPaths)

build-logic/conventions/src/main/kotlin/com/datadoghq/native/tasks/NativeLinkExecutableTask.kt:150

  • architectureArgs is always appended to the linker command line on macOS. This uses Apple Clang’s -arch flag, which can break builds when a non-Clang linker/driver is selected (e.g. Homebrew GCC via -Pnative.forceCompiler). Consider gating the flag injection based on the linker executable name.
        val cmdLine = mutableListOf<String>().apply {
            add(linker.get())
            addAll(architectureArgs)
            addAll(objectPaths)
            addAll(linkerArgs.get())

@dd-octo-sts

dd-octo-sts Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Benchmark Results (commit a309570)

Pipeline: https://gitlab.ddbuild.io/DataDog/apm-reliability/benchmarking-platform/-/pipelines/128812057 Commit: a3095700e582b4d36b3f2e15aa28002920b4c510

⚠️ Significant outliers

  • 🔴 future-genetic (JDK 25): runtime +4.2% (1990→2074 ms)
Runtime details (per benchmark × JDK)
Benchmark JDK Latest Dev Δ (dev vs latest) Issues L/D
akka-uct 21 ✅ 10422 ms (21 iters) ✅ 10382 ms (21 iters) ≈ -0.4% (±11.8%) — / —
finagle-chirper 21 ✅ 6035 ms (33 iters) ✅ 5962 ms (33 iters) ≈ -1.2% (±25.4%) ⚠️ W:3 / ⚠️ W:3
finagle-chirper 25 ✅ 5439 ms (36 iters) ✅ 5454 ms (36 iters) ≈ +0.3% (±24.2%) ⚠️ W:3 / ⚠️ W:3
future-genetic 25 ✅ 1990 ms (93 iters) ✅ 2074 ms (89 iters) 🔴 +4.2% — / —
naive-bayes 21 ✅ 1302 ms (132 iters) ✅ 1269 ms (135 iters) ≈ -2.5% (±31.9%) — / —
naive-bayes 25 ✅ 1022 ms (168 iters) ✅ 1004 ms (170 iters) ≈ -1.8% (±31.3%) — / —
reactors 21 ✅ 16294 ms (15 iters) ✅ 16713 ms (15 iters) ≈ +2.6% (±7.7%) — / —
reactors 25 ✅ 18444 ms (15 iters) ✅ 18459 ms (15 iters) ≈ +0.1% (±4.3%) — / —
Internal counter details (ddprof)

ddprof internal counters, latest / dev (✅ = 0, · = unavailable):

Benchmark JDK Dropped rec Dropped jvmti Dropped trace Skipped WC AGCT fail Unwind fail
akka-uct 21 ✅ / ✅ ✅ / ✅ 2 / 1 2024 / 2008 ✅ / ✅ ✅ / ✅
finagle-chirper 21 ✅ / ✅ ✅ / ✅ 3 / 2 8704 / 8205 ✅ / ✅ ✅ / ✅
finagle-chirper 25 ✅ / ✅ ✅ / ✅ 1 / ✅ 8214 / 8437 ✅ / ✅ ✅ / ✅
future-genetic 25 ✅ / ✅ ✅ / ✅ 2 / 3 2917 / 2947 ✅ / ✅ ✅ / ✅
naive-bayes 21 ✅ / ✅ ✅ / ✅ 6 / 3 3507 / 3570 ✅ / ✅ ✅ / ✅
naive-bayes 25 ✅ / ✅ ✅ / ✅ 1 / 5 3480 / 3444 ✅ / ✅ ✅ / ✅
reactors 21 ✅ / ✅ ✅ / ✅ ✅ / ✅ ✅ / ✅ ✅ / ✅ ✅ / ✅
reactors 25 ✅ / ✅ ✅ / ✅ 1 / ✅ 1864 / 1862 ✅ / ✅ ✅ / ✅

Copilot AI review requested due to automatic review settings August 4, 2026 11:43
@jbachorik
jbachorik force-pushed the jb/integ_tests_unknown branch 2 times, most recently from fd83b39 to f397c04 Compare August 4, 2026 11:44

Copilot AI 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.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

@jbachorik
jbachorik force-pushed the jb/integ_tests_unknown branch from f397c04 to 4d79271 Compare August 4, 2026 12:17
Copilot AI review requested due to automatic review settings August 4, 2026 12:17
@dd-octo-sts

dd-octo-sts Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Benchmark Results (commit f397c04)

Pipeline: https://gitlab.ddbuild.io/DataDog/apm-reliability/benchmarking-platform/-/pipelines/128820925 Commit: f397c04c5eb3edf48952cc183625447722e1088c

⚠️ Significant outliers

  • 🔴 future-genetic (JDK 25): runtime +3.7% (1976→2049 ms)
Runtime details (per benchmark × JDK)
Benchmark JDK Latest Dev Δ (dev vs latest) Issues L/D
akka-uct 21 ✅ 10315 ms (21 iters) ✅ 10231 ms (21 iters) ≈ -0.8% (±11.1%) — / —
akka-uct 25 ✅ 8970 ms (24 iters) ✅ 8923 ms (24 iters) ≈ -0.5% (±10.4%) — / —
finagle-chirper 21 ✅ 5951 ms (33 iters) ✅ 6061 ms (32 iters) ≈ +1.8% (±25.8%) ⚠️ W:3 / ⚠️ W:3
finagle-chirper 25 ✅ 5444 ms (36 iters) ✅ 5496 ms (36 iters) ≈ +1% (±24.3%) ⚠️ W:3 / ⚠️ W:3
fj-kmeans 21 ✅ 2733 ms (68 iters) ✅ 2672 ms (70 iters) ≈ -2.2% (±2.6%) — / —
fj-kmeans 25 ✅ 2818 ms (66 iters) ✅ 2752 ms (68 iters) ≈ -2.3% (±2.7%) — / —
future-genetic 21 ✅ 2141 ms (87 iters) ✅ 2132 ms (87 iters) ≈ -0.4% (±2.6%) — / —
future-genetic 25 ✅ 1976 ms (94 iters) ✅ 2049 ms (91 iters) 🔴 +3.7% — / —
naive-bayes 21 ✅ 1268 ms (135 iters) ✅ 1241 ms (138 iters) ≈ -2.1% (±32.3%) — / —
naive-bayes 25 ✅ 1014 ms (168 iters) ✅ 1007 ms (170 iters) ≈ -0.7% (±32%) — / —
reactors 21 ✅ 16741 ms (15 iters) ✅ 15781 ms (15 iters) ≈ -5.7% (±7.9%) — / —
reactors 25 ✅ 18423 ms (15 iters) ✅ 18595 ms (15 iters) ≈ +0.9% (±5.1%) — / —
Internal counter details (ddprof)

ddprof internal counters, latest / dev (✅ = 0, · = unavailable):

Benchmark JDK Dropped rec Dropped jvmti Dropped trace Skipped WC AGCT fail Unwind fail
akka-uct 21 ✅ / ✅ ✅ / ✅ 2 / 3 2010 / 1983 ✅ / ✅ ✅ / ✅
akka-uct 25 ✅ / ✅ ✅ / ✅ 1 / 3 2331 / 2190 ✅ / ✅ ✅ / ✅
finagle-chirper 21 ✅ / ✅ ✅ / ✅ 5 / 2 8567 / 8672 ✅ / ✅ ✅ / ✅
finagle-chirper 25 ✅ / ✅ ✅ / ✅ ✅ / ✅ 8253 / 8829 ✅ / ✅ ✅ / ✅
fj-kmeans 21 ✅ / ✅ ✅ / ✅ 3 / 2 1250 / 1249 ✅ / ✅ ✅ / ✅
fj-kmeans 25 ✅ / ✅ ✅ / ✅ 3 / ✅ 1278 / 1288 ✅ / ✅ ✅ / ✅
future-genetic 21 ✅ / ✅ ✅ / ✅ 4 / 1 2926 / 3086 ✅ / ✅ ✅ / ✅
future-genetic 25 ✅ / ✅ ✅ / ✅ 1 / ✅ 2858 / 2952 ✅ / ✅ ✅ / ✅
naive-bayes 21 ✅ / ✅ ✅ / ✅ 10 / 2 3527 / 3494 ✅ / ✅ ✅ / ✅
naive-bayes 25 ✅ / ✅ ✅ / ✅ 3 / 2 3422 / 3473 ✅ / ✅ ✅ / ✅
reactors 21 ✅ / ✅ ✅ / ✅ 1 / ✅ 1706 / 1486 ✅ / ✅ ✅ / ✅
reactors 25 ✅ / ✅ ✅ / ✅ ✅ / 1 1907 / 1849 ✅ / ✅ ✅ / ✅

Copilot AI 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.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

@dd-octo-sts

dd-octo-sts Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Benchmark Results (commit 4d79271)

Pipeline: https://gitlab.ddbuild.io/DataDog/apm-reliability/benchmarking-platform/-/pipelines/128826578 Commit: 4d792719669d8aee1cd04549c7b9f14c3c7db290

⚠️ Significant outliers

  • 🟢 fj-kmeans (JDK 21): runtime -2.9% (2689→2612 ms)
Runtime details (per benchmark × JDK)
Benchmark JDK Latest Dev Δ (dev vs latest) Issues L/D
akka-uct 21 ✅ 10371 ms (21 iters) ✅ 10176 ms (21 iters) ≈ -1.9% (±11.4%) — / —
akka-uct 25 ✅ 8802 ms (24 iters) ✅ 8900 ms (24 iters) ≈ +1.1% (±9.8%) — / —
finagle-chirper 21 ✅ 5953 ms (33 iters) ✅ 6005 ms (33 iters) ≈ +0.9% (±25.1%) ⚠️ W:3 / ⚠️ W:3
finagle-chirper 25 ✅ 5338 ms (36 iters) ✅ 5413 ms (36 iters) ≈ +1.4% (±24.4%) ⚠️ W:3 / ⚠️ W:3
fj-kmeans 21 ✅ 2689 ms (70 iters) ✅ 2612 ms (72 iters) 🟢 -2.9% — / —
fj-kmeans 25 ✅ 2817 ms (66 iters) ✅ 2813 ms (66 iters) ≈ -0.1% (±2.6%) — / —
future-genetic 21 ✅ 2114 ms (87 iters) ✅ 2091 ms (89 iters) ≈ -1.1% (±2.6%) — / —
future-genetic 25 ✅ 2062 ms (90 iters) ✅ 2081 ms (89 iters) ≈ +0.9% (±2.6%) — / —
naive-bayes 21 ✅ 1245 ms (137 iters) ✅ 1277 ms (134 iters) ≈ +2.6% (±33.2%) — / —
naive-bayes 25 ✅ 1009 ms (169 iters) ✅ 982 ms (173 iters) ≈ -2.7% (±31.4%) — / —
reactors 25 ✅ 18750 ms (14 iters) ✅ 18645 ms (15 iters) ≈ -0.6% (±4.3%) — / —
Internal counter details (ddprof)

ddprof internal counters, latest / dev (✅ = 0, · = unavailable):

Benchmark JDK Dropped rec Dropped jvmti Dropped trace Skipped WC AGCT fail Unwind fail
akka-uct 21 ✅ / ✅ ✅ / ✅ 1 / 4 1942 / 1958 ✅ / ✅ ✅ / ✅
akka-uct 25 ✅ / ✅ ✅ / ✅ ✅ / ✅ 1988 / 2386 ✅ / ✅ ✅ / ✅
finagle-chirper 21 ✅ / ✅ ✅ / ✅ 5 / 2 8472 / 8325 ✅ / ✅ ✅ / ✅
finagle-chirper 25 ✅ / ✅ ✅ / ✅ 1 / 1 8061 / 8514 ✅ / ✅ ✅ / ✅
fj-kmeans 21 ✅ / ✅ ✅ / ✅ 1 / 4 1301 / 1280 ✅ / ✅ ✅ / ✅
fj-kmeans 25 ✅ / ✅ ✅ / ✅ 3 / 5 1289 / 1273 ✅ / ✅ ✅ / ✅
future-genetic 21 ✅ / ✅ ✅ / ✅ ✅ / 1 2967 / 2966 ✅ / ✅ ✅ / ✅
future-genetic 25 ✅ / ✅ ✅ / ✅ ✅ / 2 2948 / 2928 ✅ / ✅ ✅ / ✅
naive-bayes 21 ✅ / ✅ ✅ / ✅ 2 / 5 3496 / 3488 ✅ / ✅ ✅ / ✅
naive-bayes 25 ✅ / ✅ ✅ / ✅ 1 / 7 3447 / 3456 ✅ / ✅ ✅ / ✅
reactors 21 · / ✅ · / ✅ · / ✅ · / 1808 · / ✅ · / ✅
reactors 25 ✅ / ✅ ✅ / ✅ ✅ / ✅ 1575 / 1882 ✅ / ✅ ✅ / ✅

Fixes PR review feedback: macosArchitectureArgs() unconditionally
added Apple Clang's -arch flag, breaking g++ builds via
-Pnative.forceCompiler. Also removes an unused @cstack parameter
from a test template method.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 4, 2026 13:57

Copilot AI 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.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.

Suppressed comments (1)

ddprof-test/src/test/java/com/datadoghq/profiler/cpu/NativeThreadPrimingTest.java:61

  • frameAccessor.getMember(sample) may return null; this code unconditionally calls contains() / regex matching on stackTrace, which can throw an NPE. Other ExecutionSample tests in this repo guard against null stack traces (e.g., VtableReceiverFrameTest). Add a null check (and optionally skip the sample) before inspecting the string.
                    totalSamples++;
                    String stackTrace = frameAccessor.getMember(sample);
                    if (stackTrace.contains(UNKNOWN_NATIVE_THREAD_FRAME)
                            || NO_JAVA_FRAME_ONLY.matcher(stackTrace).matches()) {
                        syntheticSamples++;

@datadog-datadog-prod-us1

This comment has been minimized.

Copilot AI review requested due to automatic review settings August 4, 2026 14:23

Copilot AI 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.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.

Suppressed comments (1)

build-logic/conventions/src/main/kotlin/com/datadoghq/native/util/PlatformUtils.kt:236

  • isClangLikeDriver() recompiles the Regex(...) on every call. This method is called from compile/link task argument construction, so repeatedly allocating/compiling the regex is unnecessary work during builds. Hoist the regex into a single private val and reuse it.
    private fun isClangLikeDriver(driver: String): Boolean {
        val name = File(driver).name
        return !Regex("""^(gcc|g\+\+)(-\d+(\.\d+)*)?$""").matches(name)
    }

@dd-octo-sts

dd-octo-sts Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Benchmark Results (commit c583077)

Pipeline: https://gitlab.ddbuild.io/DataDog/apm-reliability/benchmarking-platform/-/pipelines/128857753 Commit: c5830770f74f048652c7abf90ca93fb8d796e640

⚠️ Significant outliers

  • 🔴 future-genetic (JDK 25): runtime +5.6% (2005→2118 ms)
Runtime details (per benchmark × JDK)
Benchmark JDK Latest Dev Δ (dev vs latest) Issues L/D
akka-uct 21 ✅ 10289 ms (21 iters) ✅ 10274 ms (21 iters) ≈ -0.1% (±11.4%) — / —
akka-uct 25 ✅ 8911 ms (24 iters) ✅ 8841 ms (24 iters) ≈ -0.8% (±9.6%) — / —
finagle-chirper 21 ✅ 5972 ms (33 iters) ✅ 5957 ms (33 iters) ≈ -0.3% (±24.7%) ⚠️ W:3 / ⚠️ W:3
finagle-chirper 25 ✅ 5425 ms (36 iters) ✅ 5456 ms (36 iters) ≈ +0.6% (±24.7%) ⚠️ W:3 / ⚠️ W:3
fj-kmeans 21 ✅ 2707 ms (70 iters) ✅ 2726 ms (68 iters) ≈ +0.7% (±2.7%) — / —
fj-kmeans 25 ✅ 2807 ms (66 iters) ✅ 2797 ms (67 iters) ≈ -0.4% (±2.6%) — / —
future-genetic 21 ✅ 2110 ms (88 iters) ✅ 2064 ms (90 iters) ≈ -2.2% (±2.6%) — / —
future-genetic 25 ✅ 2005 ms (93 iters) ✅ 2118 ms (87 iters) 🔴 +5.6% — / —
naive-bayes 21 ✅ 1298 ms (132 iters) ✅ 1281 ms (134 iters) ≈ -1.3% (±32.4%) — / —
naive-bayes 25 ✅ 1013 ms (169 iters) ✅ 1020 ms (168 iters) ≈ +0.7% (±31.8%) — / —
reactors 21 ✅ 16224 ms (15 iters) ✅ 16956 ms (15 iters) ≈ +4.5% (±7.5%) — / —
reactors 25 ✅ 18184 ms (15 iters) ✅ 18593 ms (15 iters) ≈ +2.2% (±4.9%) — / —
Internal counter details (ddprof)

ddprof internal counters, latest / dev (✅ = 0, · = unavailable):

Benchmark JDK Dropped rec Dropped jvmti Dropped trace Skipped WC AGCT fail Unwind fail
akka-uct 21 ✅ / ✅ ✅ / ✅ ✅ / ✅ ✅ / ✅ ✅ / ✅ ✅ / ✅
akka-uct 25 ✅ / ✅ ✅ / ✅ 4 / 4 2441 / 2310 ✅ / ✅ ✅ / ✅
finagle-chirper 21 ✅ / ✅ ✅ / ✅ ✅ / ✅ ✅ / ✅ ✅ / ✅ ✅ / ✅
finagle-chirper 25 ✅ / ✅ ✅ / ✅ 4 / 1 8435 / 8807 ✅ / ✅ ✅ / ✅
fj-kmeans 21 ✅ / ✅ ✅ / ✅ 8 / 1 1308 / 1244 ✅ / ✅ ✅ / ✅
fj-kmeans 25 ✅ / ✅ ✅ / ✅ 2 / ✅ 1261 / 1267 ✅ / ✅ ✅ / ✅
future-genetic 21 ✅ / ✅ ✅ / ✅ 1 / 3 2951 / 2891 ✅ / ✅ ✅ / ✅
future-genetic 25 ✅ / ✅ ✅ / ✅ 2 / 1 2912 / 2878 ✅ / ✅ ✅ / ✅
naive-bayes 21 ✅ / ✅ ✅ / ✅ 3 / 2 3471 / 3509 ✅ / ✅ ✅ / ✅
naive-bayes 25 ✅ / ✅ ✅ / ✅ 5 / 1 3475 / 3487 ✅ / ✅ ✅ / ✅
reactors 21 ✅ / ✅ ✅ / ✅ 2 / 2 1601 / 1751 ✅ / ✅ ✅ / ✅
reactors 25 ✅ / ✅ ✅ / ✅ ✅ / ✅ 1893 / 1958 ✅ / ✅ ✅ / ✅

@dd-octo-sts

dd-octo-sts Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Benchmark Results (commit b53c3c3)

Pipeline: https://gitlab.ddbuild.io/DataDog/apm-reliability/benchmarking-platform/-/pipelines/128866997 Commit: b53c3c3018f0575d6ed9e4f15b92c031db910054

⚠️ Significant outliers

  • 🟢 fj-kmeans (JDK 21): runtime -3% (2733→2652 ms)
  • 🟢 fj-kmeans (JDK 25): runtime -4.8% (2838→2702 ms)
  • 🔴 future-genetic (JDK 21): runtime +3.2% (2101→2169 ms)
  • 🔴 reactors (JDK 21): runtime +12.4% (15582→17507 ms)
Runtime details (per benchmark × JDK)
Benchmark JDK Latest Dev Δ (dev vs latest) Issues L/D
akka-uct 21 ✅ 10323 ms (21 iters) ✅ 10356 ms (21 iters) ≈ +0.3% (±10.9%) — / —
akka-uct 25 ✅ 8830 ms (24 iters) ✅ 8780 ms (24 iters) ≈ -0.6% (±9.6%) — / —
finagle-chirper 21 ✅ 5961 ms (33 iters) ✅ 5953 ms (33 iters) ≈ -0.1% (±24.7%) ⚠️ W:4 / ⚠️ W:3
finagle-chirper 25 ✅ 5469 ms (36 iters) ✅ 5407 ms (36 iters) ≈ -1.1% (±24.1%) ⚠️ W:3 / ⚠️ W:3
fj-kmeans 21 ✅ 2733 ms (68 iters) ✅ 2652 ms (70 iters) 🟢 -3% — / —
fj-kmeans 25 ✅ 2838 ms (66 iters) ✅ 2702 ms (70 iters) 🟢 -4.8% — / —
future-genetic 21 ✅ 2101 ms (88 iters) ✅ 2169 ms (85 iters) 🔴 +3.2% — / —
future-genetic 25 ✅ 2060 ms (90 iters) ✅ 2010 ms (93 iters) ≈ -2.4% (±2.7%) — / —
naive-bayes 21 ✅ 1250 ms (137 iters) ✅ 1297 ms (132 iters) ≈ +3.8% (±33.4%) — / —
naive-bayes 25 ✅ 1018 ms (168 iters) ✅ 1024 ms (167 iters) ≈ +0.6% (±31.7%) — / —
reactors 21 ✅ 15582 ms (15 iters) ✅ 17507 ms (15 iters) 🔴 +12.4% — / —
reactors 25 ✅ 18192 ms (15 iters) ✅ 18154 ms (15 iters) ≈ -0.2% (±4.1%) — / —
Internal counter details (ddprof)

ddprof internal counters, latest / dev (✅ = 0, · = unavailable):

Benchmark JDK Dropped rec Dropped jvmti Dropped trace Skipped WC AGCT fail Unwind fail
akka-uct 21 ✅ / ✅ ✅ / ✅ 1 / ✅ 2015 / 1958 ✅ / ✅ ✅ / ✅
akka-uct 25 ✅ / ✅ ✅ / ✅ 1 / ✅ 2239 / 2060 ✅ / ✅ ✅ / ✅
finagle-chirper 21 ✅ / ✅ ✅ / ✅ 2 / 2 8795 / 8422 ✅ / ✅ ✅ / ✅
finagle-chirper 25 ✅ / ✅ ✅ / ✅ 4 / 2 8381 / 8098 ✅ / ✅ ✅ / ✅
fj-kmeans 21 ✅ / ✅ ✅ / ✅ 3 / 4 1259 / 1234 ✅ / ✅ ✅ / ✅
fj-kmeans 25 ✅ / ✅ ✅ / ✅ 5 / 4 1269 / 1303 ✅ / ✅ ✅ / ✅
future-genetic 21 ✅ / ✅ ✅ / ✅ 2 / 1 2922 / 2995 ✅ / ✅ ✅ / ✅
future-genetic 25 ✅ / ✅ ✅ / ✅ 1 / ✅ 2939 / 2897 ✅ / ✅ ✅ / ✅
naive-bayes 21 ✅ / ✅ ✅ / ✅ 8 / ✅ 3469 / 3493 ✅ / ✅ ✅ / ✅
naive-bayes 25 ✅ / ✅ ✅ / ✅ 3 / 3 3468 / 3476 ✅ / ✅ ✅ / ✅
reactors 21 ✅ / ✅ ✅ / ✅ 1 / 2 1506 / 1751 ✅ / ✅ ✅ / ✅
reactors 25 ✅ / ✅ ✅ / ✅ ✅ / ✅ 1877 / 1851 ✅ / ✅ ✅ / ✅

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.

2 participants