Skip to content

Conversation

@bric3
Copy link
Contributor

@bric3 bric3 commented Sep 11, 2025

What Does This Do

🙌 This allows to compile, test and produce a correct jar when the JDK running Gradle is not 1.8. I.e. it's possible to run Gradle with JDK 21.

Another win by decoupling the Gradle JDK, the build better encodes the expected bytecode target of the produced jars.

⚠️ However, some other tasks cannot run on later JDK, the reason is that the plugins that registered these tasks are too old to run on latest JDK ; spotless, spotbugs are an example of such plugins. This should be addressed in later PR, and it will likely require to run Gradle on JDK 11 minimum.

This work resumes what was started in #8883, and maybe before that. Instead of applying the toolchain for every compile tasks, it relies on the ability of the JVM running the Gradle Daemon to compile Java 1.8 (note that Java 25 can still compile to Java 1.8, and Gradle 8.14.3 carn on JDK 24 at most).

In order to achieve this, work had to be done on the default compiler configuration, and customized compiler configuration which was done via setJavaVersion

Important

setJavaVersion was renamed to configureCompiler, and now takes multiple arguments the last two are optional:

  1. the compile task itself
  2. the explicit required toolchain, e.g. when using JDK 17
  3. the targeted bytecode, otherwise the compiler use the toolchain's default target
  4. the reason why required toolchain and target bytecode are different.

E.g. in IntelliJ using JDK 24 works for compiling, and running tests

Settings | Build, Execution, Deployment | Build Tools | Gradle
image

Motivation

This preliminary work should unlocks other tasks:

  • Bumping plugins and other dependencies of the build, this can improve build efficiency, reduce security risks of using older unmaintained major versions.
  • Better support for JDK 25

Additional Notes

The produced jars, found on the GH releases page, have been checked against a tool I crafted. Other tools didn't work or didn't perform what was needed.

Note

🔗 https://github.com/bric3/jardiff

Shortcomings:

  • not released anywhere, one has to build it - a possible idea would be to integrate this in a gradle plugin to make the diff easier to read.
  • needs JDK 25

Ran the following command on this branch (folder dd-trace-java), and on master (folder dd-trace-java-copy-1)

$ ./gradlew :dd-java-agent:shadowJar :dd-trace-api:jar :dd-trace-ot:shadowJar

Assuming that jardiff runs java -jar jardiff/build/shadowed-app/jardiff-0.1.0-SNAPSHOT.jar using java 25. Also the following snippet use delta render the diff, but it's not strictly necessary.

The following diffs have been performed:

  • dd-java-agent

    jardiff ../dd-trace-java{-copy-1,}/dd-java-agent/build/libs/dd-java-agent-1.54.0-SNAPSHOT.jar -c classdata --class-text-producer=class-file-version --exclude "**/*.yaml,**/*.MF,**/*.version,*.version" | delta --syntax-theme=GitHub --light 
    image
    byte code differences, appear to be only order of some fields

    Remove the --class-text-producer=class-file-version

    image
  • dd-trace-api

    jardiff ../dd-trace-java{-copy-1,}/dd-trace-api/build/libs/dd-trace-api-1.54.0-SNAPSHOT.jar -c classdata --exclude "**/*.yaml,**/*.MF,**/*.version,*.version" | delta --syntax-theme=GitHub --light
  • dd-trace-ot

    jardiff ../dd-trace-java{-copy-1,}/dd-trace-ot/build/libs/dd-trace-ot-1.54.0-SNAPSHOT.jar -c classdata --exclude "**/*.yaml,**/*.MF,**/*.version,*.version" | delta --syntax-theme=GitHub --light

Note

While running compiling and generating the code using a more recent JDK. I noticed the following change in bytecode for some methods, this is legal and will run correctly on JDK 8.
image
image

Thanks to @mcculls for digging into the reasons, and updating muzzle in #9649

AFAICT the behaviour changed in Java 18/19 when the JDK team were digging more into the interaction between interfaces and their implicit superclass java.lang.Object - for a long time javac had always generated invokevirtual calls to Object method refs, which while it worked is not quite correct if you read the JLS spec closely.
This was originally noticed back in https://bugs.openjdk.org/browse/JDK-4974954 when comparing javac's output to that from jikes, which is another Java compiler (one that sticks really closely to the letter of the spec).
Nothing much happened until Java 18/19 when JDK-8272715 and JDK-8282080 led to a wholesale refactoring of that part of the code.
The key change is described in JDK-8272715:

  • invocations of java.lang.Object methods on interfaces in the classfile will use invokeinterface referring to the interface, which is consistent with JLS 9.2. This will be done regardless of whether the interface declares the method explicitly or not.

TL;DR is that both forms will work in Java 8, i.e. they'll resolve to the same method in the end, but the invokeinterface call is more consistent with the JLS spec.

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@bric3 bric3 added the comp: tooling Build & Tooling label Sep 11, 2025
@datadog-official
Copy link

datadog-official bot commented Sep 11, 2025

🎯 Code Coverage
Patch Coverage: 100.00%
Total Coverage: 59.67% (-0.02%)

View detailed report

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: e8ab4c6 | Docs | Was this helpful? Give us feedback!

@bric3 bric3 force-pushed the bdu/resume-gradle-toolchain8 branch from c709cb4 to 5df8195 Compare September 12, 2025 12:48
@pr-commenter
Copy link

pr-commenter bot commented Sep 12, 2025

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master bdu/resume-gradle-toolchain8
git_commit_date 1759773830 1759847339
git_commit_sha 3745413 e8ab4c6
release_version 1.55.0-SNAPSHOT~37454135e4 1.55.0-SNAPSHOT~e8ab4c6c59
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1759849295 1759849295
ci_job_id 1167215126 1167215126
ci_pipeline_id 78601226 78601226
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-0-oqdaijnr 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-0-oqdaijnr 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
module Agent Agent
parent None None

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 60 metrics, 5 unstable metrics.

Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.55.0-SNAPSHOT~e8ab4c6c59, baseline=1.55.0-SNAPSHOT~37454135e4

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.027 s) : 0, 1026621
Total [baseline] (8.675 s) : 0, 8674692
Agent [candidate] (1.028 s) : 0, 1027956
Total [candidate] (8.694 s) : 0, 8693659
section iast
Agent [baseline] (1.15 s) : 0, 1150034
Total [baseline] (9.278 s) : 0, 9278150
Agent [candidate] (1.158 s) : 0, 1158010
Total [candidate] (9.288 s) : 0, 9288260
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.027 s -
Agent iast 1.15 s 123.413 ms (12.0%)
Total tracing 8.675 s -
Total iast 9.278 s 603.459 ms (7.0%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.028 s -
Agent iast 1.158 s 130.053 ms (12.7%)
Total tracing 8.694 s -
Total iast 9.288 s 594.602 ms (6.8%)
gantt
    title insecure-bank - break down per module: candidate=1.55.0-SNAPSHOT~e8ab4c6c59, baseline=1.55.0-SNAPSHOT~37454135e4

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.471 ms) : 0, 1471
crashtracking [candidate] (1.481 ms) : 0, 1481
BytebuddyAgent [baseline] (700.305 ms) : 0, 700305
BytebuddyAgent [candidate] (701.288 ms) : 0, 701288
GlobalTracer [baseline] (243.154 ms) : 0, 243154
GlobalTracer [candidate] (244.004 ms) : 0, 244004
AppSec [baseline] (33.104 ms) : 0, 33104
AppSec [candidate] (33.099 ms) : 0, 33099
Debugger [baseline] (6.489 ms) : 0, 6489
Debugger [candidate] (6.48 ms) : 0, 6480
Remote Config [baseline] (709.824 µs) : 0, 710
Remote Config [candidate] (703.222 µs) : 0, 703
Telemetry [baseline] (9.233 ms) : 0, 9233
Telemetry [candidate] (9.317 ms) : 0, 9317
Flare Poller [baseline] (10.987 ms) : 0, 10987
Flare Poller [candidate] (10.321 ms) : 0, 10321
section iast
crashtracking [baseline] (1.466 ms) : 0, 1466
crashtracking [candidate] (1.477 ms) : 0, 1477
BytebuddyAgent [baseline] (814.086 ms) : 0, 814086
BytebuddyAgent [candidate] (820.106 ms) : 0, 820106
GlobalTracer [baseline] (231.732 ms) : 0, 231732
GlobalTracer [candidate] (232.96 ms) : 0, 232960
IAST [baseline] (26.427 ms) : 0, 26427
IAST [candidate] (26.864 ms) : 0, 26864
AppSec [baseline] (35.297 ms) : 0, 35297
AppSec [candidate] (35.585 ms) : 0, 35585
Debugger [baseline] (6.148 ms) : 0, 6148
Debugger [candidate] (6.168 ms) : 0, 6168
Remote Config [baseline] (616.979 µs) : 0, 617
Remote Config [candidate] (609.792 µs) : 0, 610
Telemetry [baseline] (8.724 ms) : 0, 8724
Telemetry [candidate] (8.739 ms) : 0, 8739
Flare Poller [baseline] (4.307 ms) : 0, 4307
Flare Poller [candidate] (4.179 ms) : 0, 4179
Loading
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.55.0-SNAPSHOT~e8ab4c6c59, baseline=1.55.0-SNAPSHOT~37454135e4

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.034 s) : 0, 1033630
Total [baseline] (10.757 s) : 0, 10756598
Agent [candidate] (1.027 s) : 0, 1027194
Total [candidate] (10.704 s) : 0, 10704231
section appsec
Agent [baseline] (1.194 s) : 0, 1194262
Total [baseline] (10.958 s) : 0, 10957641
Agent [candidate] (1.195 s) : 0, 1195433
Total [candidate] (11.021 s) : 0, 11021005
section iast
Agent [baseline] (1.152 s) : 0, 1151975
Total [baseline] (10.938 s) : 0, 10938458
Agent [candidate] (1.155 s) : 0, 1154748
Total [candidate] (11.044 s) : 0, 11044387
section profiling
Agent [baseline] (1.171 s) : 0, 1171422
Total [baseline] (11.014 s) : 0, 11013893
Agent [candidate] (1.173 s) : 0, 1172995
Total [candidate] (11.032 s) : 0, 11032363
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.034 s -
Agent appsec 1.194 s 160.632 ms (15.5%)
Agent iast 1.152 s 118.345 ms (11.4%)
Agent profiling 1.171 s 137.792 ms (13.3%)
Total tracing 10.757 s -
Total appsec 10.958 s 201.043 ms (1.9%)
Total iast 10.938 s 181.86 ms (1.7%)
Total profiling 11.014 s 257.295 ms (2.4%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.027 s -
Agent appsec 1.195 s 168.239 ms (16.4%)
Agent iast 1.155 s 127.555 ms (12.4%)
Agent profiling 1.173 s 145.802 ms (14.2%)
Total tracing 10.704 s -
Total appsec 11.021 s 316.775 ms (3.0%)
Total iast 11.044 s 340.156 ms (3.2%)
Total profiling 11.032 s 328.133 ms (3.1%)
gantt
    title petclinic - break down per module: candidate=1.55.0-SNAPSHOT~e8ab4c6c59, baseline=1.55.0-SNAPSHOT~37454135e4

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.474 ms) : 0, 1474
crashtracking [candidate] (1.473 ms) : 0, 1473
BytebuddyAgent [baseline] (704.702 ms) : 0, 704702
BytebuddyAgent [candidate] (699.223 ms) : 0, 699223
GlobalTracer [baseline] (245.185 ms) : 0, 245185
GlobalTracer [candidate] (243.981 ms) : 0, 243981
AppSec [baseline] (33.32 ms) : 0, 33320
AppSec [candidate] (33.106 ms) : 0, 33106
Debugger [baseline] (6.516 ms) : 0, 6516
Debugger [candidate] (6.433 ms) : 0, 6433
Remote Config [baseline] (711.838 µs) : 0, 712
Remote Config [candidate] (713.144 µs) : 0, 713
Telemetry [baseline] (9.317 ms) : 0, 9317
Telemetry [candidate] (9.271 ms) : 0, 9271
Flare Poller [baseline] (11.149 ms) : 0, 11149
Flare Poller [candidate] (11.719 ms) : 0, 11719
section appsec
crashtracking [baseline] (1.459 ms) : 0, 1459
crashtracking [candidate] (1.459 ms) : 0, 1459
BytebuddyAgent [baseline] (718.273 ms) : 0, 718273
BytebuddyAgent [candidate] (718.226 ms) : 0, 718226
GlobalTracer [baseline] (234.132 ms) : 0, 234132
GlobalTracer [candidate] (235.056 ms) : 0, 235056
IAST [baseline] (24.792 ms) : 0, 24792
IAST [candidate] (24.807 ms) : 0, 24807
AppSec [baseline] (175.338 ms) : 0, 175338
AppSec [candidate] (175.755 ms) : 0, 175755
Debugger [baseline] (6.113 ms) : 0, 6113
Debugger [candidate] (6.031 ms) : 0, 6031
Remote Config [baseline] (649.484 µs) : 0, 649
Remote Config [candidate] (648.384 µs) : 0, 648
Telemetry [baseline] (8.455 ms) : 0, 8455
Telemetry [candidate] (8.373 ms) : 0, 8373
Flare Poller [baseline] (4.013 ms) : 0, 4013
Flare Poller [candidate] (3.95 ms) : 0, 3950
section iast
crashtracking [baseline] (1.48 ms) : 0, 1480
crashtracking [candidate] (1.462 ms) : 0, 1462
BytebuddyAgent [baseline] (815.598 ms) : 0, 815598
BytebuddyAgent [candidate] (816.888 ms) : 0, 816888
GlobalTracer [baseline] (232.327 ms) : 0, 232327
GlobalTracer [candidate] (233.198 ms) : 0, 233198
IAST [baseline] (26.442 ms) : 0, 26442
IAST [candidate] (26.692 ms) : 0, 26692
AppSec [baseline] (35.433 ms) : 0, 35433
AppSec [candidate] (35.618 ms) : 0, 35618
Debugger [baseline] (6.096 ms) : 0, 6096
Debugger [candidate] (6.16 ms) : 0, 6160
Remote Config [baseline] (597.16 µs) : 0, 597
Remote Config [candidate] (614.256 µs) : 0, 614
Telemetry [baseline] (8.568 ms) : 0, 8568
Telemetry [candidate] (8.642 ms) : 0, 8642
Flare Poller [baseline] (4.135 ms) : 0, 4135
Flare Poller [candidate] (4.16 ms) : 0, 4160
section profiling
crashtracking [baseline] (1.44 ms) : 0, 1440
crashtracking [candidate] (1.479 ms) : 0, 1479
BytebuddyAgent [baseline] (727.193 ms) : 0, 727193
BytebuddyAgent [candidate] (728.405 ms) : 0, 728405
GlobalTracer [baseline] (219.313 ms) : 0, 219313
GlobalTracer [candidate] (219.092 ms) : 0, 219092
AppSec [baseline] (33.393 ms) : 0, 33393
AppSec [candidate] (33.358 ms) : 0, 33358
Debugger [baseline] (7.307 ms) : 0, 7307
Debugger [candidate] (8.116 ms) : 0, 8116
Remote Config [baseline] (693.054 µs) : 0, 693
Remote Config [candidate] (701.072 µs) : 0, 701
Telemetry [baseline] (15.857 ms) : 0, 15857
Telemetry [candidate] (15.148 ms) : 0, 15148
Flare Poller [baseline] (4.185 ms) : 0, 4185
Flare Poller [candidate] (4.212 ms) : 0, 4212
ProfilingAgent [baseline] (108.478 ms) : 0, 108478
ProfilingAgent [candidate] (108.52 ms) : 0, 108520
Profiling [baseline] (109.756 ms) : 0, 109756
Profiling [candidate] (110.072 ms) : 0, 110072
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master bdu/resume-gradle-toolchain8
git_commit_date 1759773830 1759847339
git_commit_sha 3745413 e8ab4c6
release_version 1.55.0-SNAPSHOT~37454135e4 1.55.0-SNAPSHOT~e8ab4c6c59
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1759848965 1759848965
ci_job_id 1167215127 1167215127
ci_pipeline_id 78601226 78601226
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-0-lze90w5n 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-0-lze90w5n 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Summary

Found 5 performance improvements and 1 performance regressions! Performance is the same for 6 metrics, 12 unstable metrics.

scenario Δ mean http_req_duration Δ mean throughput candidate mean http_req_duration candidate mean throughput baseline mean http_req_duration baseline mean throughput
scenario:load:insecure-bank:profiling:high_load better
[-633.424µs; -295.441µs] or [-6.715%; -3.132%]
unstable
[-34.323op/s; +114.584op/s] or [-7.193%; +24.013%]
8.969ms 517.312op/s 9.433ms 477.182op/s
scenario:load:insecure-bank:tracing:high_load better
[-601.401µs; -355.760µs] or [-7.560%; -4.472%]
unstable
[-42.616op/s; +116.491op/s] or [-7.319%; +20.006%]
7.477ms 619.219op/s 7.955ms 582.281op/s
scenario:load:insecure-bank:iast:high_load better
[-774.174µs; -416.474µs] or [-7.576%; -4.076%]
unstable
[-31.695op/s; +87.195op/s] or [-6.971%; +19.177%]
9.624ms 482.438op/s 10.219ms 454.688op/s
scenario:load:petclinic:profiling:high_load worse
[+1.660ms; +2.581ms] or [+3.549%; +5.517%]
unstable
[-11.696op/s; +3.046op/s] or [-11.693%; +3.045%]
48.902ms 95.700op/s 46.782ms 100.025op/s
scenario:load:petclinic:appsec:high_load better
[-2.238ms; -1.334ms] or [-4.604%; -2.744%]
unstable
[-3.626op/s; +10.876op/s] or [-3.766%; +11.297%]
46.830ms 99.900op/s 48.616ms 96.275op/s
scenario:load:petclinic:tracing:high_load better
[-2.925ms; -2.089ms] or [-6.316%; -4.510%]
unstable
[-2.030op/s; +13.430op/s] or [-2.008%; +13.285%]
43.805ms 106.787op/s 46.312ms 101.088op/s
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~e8ab4c6c59, baseline=1.55.0-SNAPSHOT~37454135e4
    dateFormat X
    axisFormat %s
section baseline
no_agent (37.387 ms) : 37089, 37685
.   : milestone, 37387,
appsec (48.616 ms) : 48186, 49045
.   : milestone, 48616,
code_origins (44.166 ms) : 43801, 44530
.   : milestone, 44166,
iast (45.971 ms) : 45568, 46374
.   : milestone, 45971,
profiling (46.782 ms) : 46370, 47194
.   : milestone, 46782,
tracing (46.312 ms) : 45911, 46712
.   : milestone, 46312,
section candidate
no_agent (37.181 ms) : 36878, 37483
.   : milestone, 37181,
appsec (46.83 ms) : 46419, 47240
.   : milestone, 46830,
code_origins (43.552 ms) : 43173, 43931
.   : milestone, 43552,
iast (45.293 ms) : 44907, 45678
.   : milestone, 45293,
profiling (48.902 ms) : 48459, 49346
.   : milestone, 48902,
tracing (43.805 ms) : 43429, 44181
.   : milestone, 43805,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 37.387 ms [37.089 ms, 37.685 ms] -
appsec 48.616 ms [48.186 ms, 49.045 ms] 11.229 ms (30.0%)
code_origins 44.166 ms [43.801 ms, 44.53 ms] 6.778 ms (18.1%)
iast 45.971 ms [45.568 ms, 46.374 ms] 8.584 ms (23.0%)
profiling 46.782 ms [46.37 ms, 47.194 ms] 9.395 ms (25.1%)
tracing 46.312 ms [45.911 ms, 46.712 ms] 8.925 ms (23.9%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 37.181 ms [36.878 ms, 37.483 ms] -
appsec 46.83 ms [46.419 ms, 47.24 ms] 9.649 ms (26.0%)
code_origins 43.552 ms [43.173 ms, 43.931 ms] 6.371 ms (17.1%)
iast 45.293 ms [44.907 ms, 45.678 ms] 8.112 ms (21.8%)
profiling 48.902 ms [48.459 ms, 49.346 ms] 11.722 ms (31.5%)
tracing 43.805 ms [43.429 ms, 44.181 ms] 6.624 ms (17.8%)
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~e8ab4c6c59, baseline=1.55.0-SNAPSHOT~37454135e4
    dateFormat X
    axisFormat %s
section baseline
no_agent (4.366 ms) : 4314, 4418
.   : milestone, 4366,
iast (10.219 ms) : 10047, 10391
.   : milestone, 10219,
iast_FULL (13.891 ms) : 13612, 14171
.   : milestone, 13891,
iast_GLOBAL (10.837 ms) : 10645, 11029
.   : milestone, 10837,
profiling (9.433 ms) : 9260, 9606
.   : milestone, 9433,
tracing (7.955 ms) : 7833, 8078
.   : milestone, 7955,
section candidate
no_agent (4.378 ms) : 4326, 4429
.   : milestone, 4378,
iast (9.624 ms) : 9463, 9784
.   : milestone, 9624,
iast_FULL (14.396 ms) : 14099, 14694
.   : milestone, 14396,
iast_GLOBAL (10.663 ms) : 10473, 10854
.   : milestone, 10663,
profiling (8.969 ms) : 8830, 9108
.   : milestone, 8969,
tracing (7.477 ms) : 7371, 7582
.   : milestone, 7477,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 4.366 ms [4.314 ms, 4.418 ms] -
iast 10.219 ms [10.047 ms, 10.391 ms] 5.853 ms (134.1%)
iast_FULL 13.891 ms [13.612 ms, 14.171 ms] 9.526 ms (218.2%)
iast_GLOBAL 10.837 ms [10.645 ms, 11.029 ms] 6.471 ms (148.2%)
profiling 9.433 ms [9.26 ms, 9.606 ms] 5.067 ms (116.1%)
tracing 7.955 ms [7.833 ms, 8.078 ms] 3.59 ms (82.2%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 4.378 ms [4.326 ms, 4.429 ms] -
iast 9.624 ms [9.463 ms, 9.784 ms] 5.246 ms (119.8%)
iast_FULL 14.396 ms [14.099 ms, 14.694 ms] 10.019 ms (228.9%)
iast_GLOBAL 10.663 ms [10.473 ms, 10.854 ms] 6.286 ms (143.6%)
profiling 8.969 ms [8.83 ms, 9.108 ms] 4.591 ms (104.9%)
tracing 7.477 ms [7.371 ms, 7.582 ms] 3.099 ms (70.8%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master bdu/resume-gradle-toolchain8
git_commit_date 1759773830 1759847339
git_commit_sha 3745413 e8ab4c6
release_version 1.55.0-SNAPSHOT~37454135e4 1.55.0-SNAPSHOT~e8ab4c6c59
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1759849468 1759849468
ci_job_id 1167215128 1167215128
ci_pipeline_id 78601226 78601226
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-0-xla9mbd0 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-0-xla9mbd0 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 1 unstable metrics.

Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.55.0-SNAPSHOT~e8ab4c6c59, baseline=1.55.0-SNAPSHOT~37454135e4
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.457 s) : 15457000, 15457000
.   : milestone, 15457000,
appsec (15.284 s) : 15284000, 15284000
.   : milestone, 15284000,
iast (18.656 s) : 18656000, 18656000
.   : milestone, 18656000,
iast_GLOBAL (18.377 s) : 18377000, 18377000
.   : milestone, 18377000,
profiling (14.717 s) : 14717000, 14717000
.   : milestone, 14717000,
tracing (14.951 s) : 14951000, 14951000
.   : milestone, 14951000,
section candidate
no_agent (15.273 s) : 15273000, 15273000
.   : milestone, 15273000,
appsec (15.173 s) : 15173000, 15173000
.   : milestone, 15173000,
iast (18.555 s) : 18555000, 18555000
.   : milestone, 18555000,
iast_GLOBAL (17.947 s) : 17947000, 17947000
.   : milestone, 17947000,
profiling (15.646 s) : 15646000, 15646000
.   : milestone, 15646000,
tracing (14.918 s) : 14918000, 14918000
.   : milestone, 14918000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.457 s [15.457 s, 15.457 s] -
appsec 15.284 s [15.284 s, 15.284 s] -173.0 ms (-1.1%)
iast 18.656 s [18.656 s, 18.656 s] 3.199 s (20.7%)
iast_GLOBAL 18.377 s [18.377 s, 18.377 s] 2.92 s (18.9%)
profiling 14.717 s [14.717 s, 14.717 s] -740.0 ms (-4.8%)
tracing 14.951 s [14.951 s, 14.951 s] -506.0 ms (-3.3%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.273 s [15.273 s, 15.273 s] -
appsec 15.173 s [15.173 s, 15.173 s] -100.0 ms (-0.7%)
iast 18.555 s [18.555 s, 18.555 s] 3.282 s (21.5%)
iast_GLOBAL 17.947 s [17.947 s, 17.947 s] 2.674 s (17.5%)
profiling 15.646 s [15.646 s, 15.646 s] 373.0 ms (2.4%)
tracing 14.918 s [14.918 s, 14.918 s] -355.0 ms (-2.3%)
Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.55.0-SNAPSHOT~e8ab4c6c59, baseline=1.55.0-SNAPSHOT~37454135e4
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.473 ms) : 1461, 1484
.   : milestone, 1473,
appsec (3.72 ms) : 3502, 3939
.   : milestone, 3720,
iast (2.205 ms) : 2141, 2268
.   : milestone, 2205,
iast_GLOBAL (2.262 ms) : 2197, 2328
.   : milestone, 2262,
profiling (2.067 ms) : 2014, 2120
.   : milestone, 2067,
tracing (2.016 ms) : 1966, 2066
.   : milestone, 2016,
section candidate
no_agent (1.472 ms) : 1461, 1484
.   : milestone, 1472,
appsec (3.726 ms) : 3507, 3945
.   : milestone, 3726,
iast (2.207 ms) : 2144, 2271
.   : milestone, 2207,
iast_GLOBAL (2.249 ms) : 2185, 2313
.   : milestone, 2249,
profiling (2.075 ms) : 2021, 2128
.   : milestone, 2075,
tracing (2.031 ms) : 1981, 2081
.   : milestone, 2031,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.473 ms [1.461 ms, 1.484 ms] -
appsec 3.72 ms [3.502 ms, 3.939 ms] 2.248 ms (152.6%)
iast 2.205 ms [2.141 ms, 2.268 ms] 732.245 µs (49.7%)
iast_GLOBAL 2.262 ms [2.197 ms, 2.328 ms] 789.733 µs (53.6%)
profiling 2.067 ms [2.014 ms, 2.12 ms] 593.934 µs (40.3%)
tracing 2.016 ms [1.966 ms, 2.066 ms] 543.303 µs (36.9%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.472 ms [1.461 ms, 1.484 ms] -
appsec 3.726 ms [3.507 ms, 3.945 ms] 2.254 ms (153.1%)
iast 2.207 ms [2.144 ms, 2.271 ms] 735.258 µs (49.9%)
iast_GLOBAL 2.249 ms [2.185 ms, 2.313 ms] 776.762 µs (52.8%)
profiling 2.075 ms [2.021 ms, 2.128 ms] 602.523 µs (40.9%)
tracing 2.031 ms [1.981 ms, 2.081 ms] 558.828 µs (38.0%)

@bric3 bric3 force-pushed the bdu/resume-gradle-toolchain8 branch 3 times, most recently from 1555846 to 680c4b1 Compare September 18, 2025 08:57
@pr-commenter
Copy link

pr-commenter bot commented Sep 18, 2025

Kafka / producer-benchmark

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master bdu/resume-gradle-toolchain8
git_commit_date 1759838675 1759841155
git_commit_sha 362e742 a5eec7f
See matching parameters
Baseline Candidate
ci_job_date 1759842291 1759842291
ci_job_id 1166869745 1166869745
ci_pipeline_id 78585461 78585461
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
jdkVersion 11.0.25 11.0.25
jmhVersion 1.36 1.36
jvm /usr/lib/jvm/java-11-openjdk-amd64/bin/java /usr/lib/jvm/java-11-openjdk-amd64/bin/java
jvmArgs -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/go/src/github.com/DataDog/apm-reliability/dd-trace-java/platform/src/producer-benchmark/build/tmp/jmh -Duser.country=US -Duser.language=en -Duser.variant -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/go/src/github.com/DataDog/apm-reliability/dd-trace-java/platform/src/producer-benchmark/build/tmp/jmh -Duser.country=US -Duser.language=en -Duser.variant
vmName OpenJDK 64-Bit Server VM OpenJDK 64-Bit Server VM
vmVersion 11.0.25+9-post-Ubuntu-1ubuntu122.04 11.0.25+9-post-Ubuntu-1ubuntu122.04

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 3 metrics, 0 unstable metrics.

See unchanged results
scenario Δ mean throughput
scenario:not-instrumented/KafkaProduceBenchmark.benchProduce same
scenario:only-tracing-dsm-disabled-benchmarks/KafkaProduceBenchmark.benchProduce same
scenario:only-tracing-dsm-enabled-benchmarks/KafkaProduceBenchmark.benchProduce same

@bric3
Copy link
Contributor Author

bric3 commented Sep 18, 2025

Note

I didn't pursue the approach of using toolchains for every compile tasks as CI didn't like launching the compiler as it breaks CI.

Example failed stacktraces
Caused by: org.gradle.process.internal.ExecException: Process 'Gradle Test Executor 70' finished with non-zero exit value 1
    at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:442)
    at org.gradle.process.internal.worker.DefaultWorkerProcess.onProcessStop(DefaultWorkerProcess.java:146)
    at org.gradle.process.internal.worker.DefaultWorkerProcess.access$000(DefaultWorkerProcess.java:43)
    at org.gradle.process.internal.worker.DefaultWorkerProcess$1.executionFinished(DefaultWorkerProcess.java:99)
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
Caused by: org.gradle.process.internal.ExecException: Process 'Gradle Test Executor 930' finished with non-zero exit value 1
    at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:442)
    at org.gradle.process.internal.worker.DefaultWorkerProcess.onProcessStop(DefaultWorkerProcess.java:146)
    at org.gradle.process.internal.worker.DefaultWorkerProcess.access$000(DefaultWorkerProcess.java:43)
    at org.gradle.process.internal.worker.DefaultWorkerProcess$1.executionFinished(DefaultWorkerProcess.java:99)

https://scans.gradle.com/s/6i2mgmie2lr6w

Instead, this approach relies on the fact that the JVM that runs the Gradle daemon can compile to Java 1.8. Which still holds true for Java 25.
While it is possible that later version of the JDK drops support compiling to Java 1.8, we can still run the Gradle Daemon with a JDK that is able compile to this target.

@bric3 bric3 force-pushed the bdu/resume-gradle-toolchain8 branch from 680c4b1 to 692a27a Compare September 18, 2025 15:03
@pr-commenter
Copy link

pr-commenter bot commented Sep 18, 2025

Kafka / consumer-benchmark

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master bdu/resume-gradle-toolchain8
git_commit_date 1759838675 1759841155
git_commit_sha 362e742 a5eec7f
See matching parameters
Baseline Candidate
ci_job_date 1759842330 1759842330
ci_job_id 1166869747 1166869747
ci_pipeline_id 78585461 78585461
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
jdkVersion 11.0.25 11.0.25
jmhVersion 1.36 1.36
jvm /usr/lib/jvm/java-11-openjdk-amd64/bin/java /usr/lib/jvm/java-11-openjdk-amd64/bin/java
jvmArgs -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/go/src/github.com/DataDog/apm-reliability/dd-trace-java/platform/src/consumer-benchmark/build/tmp/jmh -Duser.country=US -Duser.language=en -Duser.variant -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/go/src/github.com/DataDog/apm-reliability/dd-trace-java/platform/src/consumer-benchmark/build/tmp/jmh -Duser.country=US -Duser.language=en -Duser.variant
vmName OpenJDK 64-Bit Server VM OpenJDK 64-Bit Server VM
vmVersion 11.0.25+9-post-Ubuntu-1ubuntu122.04 11.0.25+9-post-Ubuntu-1ubuntu122.04

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 3 metrics, 0 unstable metrics.

See unchanged results
scenario Δ mean throughput
scenario:not-instrumented/KafkaConsumerBenchmark.benchConsume same
scenario:only-tracing-dsm-disabled-benchmarks/KafkaConsumerBenchmark.benchConsume unsure
[-21871.748op/s; -2023.208op/s] or [-6.941%; -0.642%]
scenario:only-tracing-dsm-enabled-benchmarks/KafkaConsumerBenchmark.benchConsume same

@bric3 bric3 force-pushed the bdu/resume-gradle-toolchain8 branch 3 times, most recently from 968cecd to c04c53a Compare September 23, 2025 21:27
@pr-commenter
Copy link

pr-commenter bot commented Sep 24, 2025

Debugger benchmarks

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
ci_job_date 1759848131 1759848476
end_time 2025-10-07T14:43:31 2025-10-07T14:49:16
git_branch master bdu/resume-gradle-toolchain8
git_commit_sha 3745413 e8ab4c6
start_time 2025-10-07T14:42:11 2025-10-07T14:47:57
See matching parameters
Baseline Candidate
ci_job_id 1167215133 1167215133
ci_pipeline_id 78601226 78601226
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
git_commit_date 1759847339 1759847339

Summary

Found 2 performance improvements and 0 performance regressions! Performance is the same for 7 metrics, 6 unstable metrics.

scenario Δ mean agg_http_req_duration_min Δ mean agg_http_req_duration_p50 Δ mean agg_http_req_duration_p75 Δ mean agg_http_req_duration_p99 Δ mean throughput
scenario:basic better
[-13.654µs; -3.493µs] or [-5.356%; -1.370%]
better
[-20.608µs; -4.477µs] or [-7.197%; -1.563%]
unsure
[-20.480µs; -1.585µs] or [-6.940%; -0.537%]
unstable
[+81.288µs; +306.380µs] or [+11.229%; +42.324%]
unstable
[-75.841op/s; +218.089op/s] or [-2.882%; +8.287%]
See unchanged results
scenario Δ mean agg_http_req_duration_min Δ mean agg_http_req_duration_p50 Δ mean agg_http_req_duration_p75 Δ mean agg_http_req_duration_p99 Δ mean throughput
scenario:noprobe unstable
[-62.559µs; +24.383µs] or [-21.377%; +8.332%]
unstable
[-79.039µs; +31.965µs] or [-23.500%; +9.504%]
unstable
[-92.154µs; +39.045µs] or [-26.114%; +11.064%]
unstable
[-581.253µs; +273.581µs] or [-51.167%; +24.083%]
same
scenario:loop unsure
[-11.914µs; -3.096µs] or [-0.134%; -0.035%]
same same same same
Request duration reports for reports
gantt
    title reports - request duration [CI 0.99] : candidate=None, baseline=None
    dateFormat X
    axisFormat %s
section baseline
noprobe (336.33 µs) : 266, 407
.   : milestone, 336,
basic (286.334 µs) : 277, 296
.   : milestone, 286,
loop (8.966 ms) : 8960, 8972
.   : milestone, 8966,
section candidate
noprobe (312.793 µs) : 287, 338
.   : milestone, 313,
basic (273.792 µs) : 268, 279
.   : milestone, 274,
loop (8.965 ms) : 8960, 8969
.   : milestone, 8965,
Loading
  • baseline results
Scenario Request median duration [CI 0.99]
noprobe 336.33 µs [266.066 µs, 406.594 µs]
basic 286.334 µs [276.691 µs, 295.978 µs]
loop 8.966 ms [8.96 ms, 8.972 ms]
  • candidate results
Scenario Request median duration [CI 0.99]
noprobe 312.793 µs [287.362 µs, 338.224 µs]
basic 273.792 µs [268.137 µs, 279.446 µs]
loop 8.965 ms [8.96 ms, 8.969 ms]

@bric3 bric3 force-pushed the bdu/resume-gradle-toolchain8 branch 4 times, most recently from a2b46f0 to a02556a Compare September 24, 2025 15:35
@bric3 bric3 force-pushed the bdu/resume-gradle-toolchain8 branch 10 times, most recently from efd5777 to fa248d7 Compare September 30, 2025 23:29
bric3 added 22 commits October 7, 2025 16:28
# Conflicts:
#	dd-java-agent/instrumentation/kafka/kafka-clients-3.8/build.gradle

# Conflicts:
#	dd-java-agent/agent-profiling/profiling-controller-jfr/build.gradle
#	dd-java-agent/instrumentation/play/play-2.6/build.gradle
#	dd-java-agent/instrumentation/wildfly-9.0/build.gradle
#	dd-smoke-tests/concurrent/java-25/build.gradle
#	utils/socket-utils/build.gradle.kts

# Conflicts:
#	dd-java-agent/agent-bootstrap/build.gradle
#	dd-java-agent/agent-builder/build.gradle
#	dd-java-agent/agent-profiling/profiling-controller-jfr/build.gradle
#	dd-java-agent/instrumentation/akka/akka-http/akka-http-10.6/build.gradle
#	dd-java-agent/instrumentation/exception-profiling/build.gradle
#	dd-java-agent/instrumentation/graal/native-image/build.gradle
#	dd-java-agent/instrumentation/jetty/jetty-server/jetty-server-12.0/build.gradle
#	dd-java-agent/instrumentation/kafka/kafka-clients-3.8/build.gradle
#	dd-java-agent/instrumentation/liberty-20/build.gradle
#	dd-java-agent/instrumentation/micronaut/http-server-netty-4.0/build.gradle
#	dd-java-agent/instrumentation/play/play-2.6/build.gradle
#	dd-java-agent/instrumentation/spring/spring-scheduling-3.1/build.gradle
#	dd-java-agent/instrumentation/spring/spring-webmvc/spring-webmvc-6.0/build.gradle
#	dd-java-agent/instrumentation/vertx/vertx-web/vertx-web-4.0/build.gradle
#	dd-java-agent/instrumentation/websocket/jetty-websocket/jetty-websocket-10/build.gradle
#	dd-java-agent/instrumentation/wildfly-9.0/build.gradle
…ource/target

# Conflicts:
#	dd-java-agent/agent-tooling/build.gradle
When Groovy compiles this code against JDK 21 **but targeting Java 8**,

```
URLClassLoader loader = new URLClassLoader(classpath, null, null) {
    @OverRide
    Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
        ...
    }
  }
```

Groovy will generate super class synthetic accessor methods like

* `super$2$loadClass(Ljava/lang/String;)Ljava/lang/Class;`
* `super$2$loadClass(Ljava/lang/String;Z)Ljava/lang/Class;`
* `super$2$loadClass(Ljava/lang/Module;Ljava/lang/String;)Ljava/lang/Class;`

`java.lang.Module` being missing from Java 8 won't run.

java.lang.NoClassDefFoundError: java/lang/Module
	at java.lang.Class.getDeclaredMethods0(Native Method)
	at java.lang.Class.privateGetDeclaredMethods(Class.java:2729)
	at java.lang.Class.privateGetPublicMethods(Class.java:2930)
	at java.lang.Class.getMethods(Class.java:1643)
	at groovy.lang.MetaClassImpl.inheritInterfaceNewMetaMethods(MetaClassImpl.java:628)
	at groovy.lang.MetaClassImpl.fillMethodIndex(MetaClassImpl.java:368)
	at groovy.lang.MetaClassImpl.reinitialize(MetaClassImpl.java:3381)
	at groovy.lang.MetaClassImpl.initialize(MetaClassImpl.java:3376)
	at org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:273)
	at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:315)
	at datadog.trace.agent.test.BaseExceptionHandlerTest$1.$getStaticMetaClass(BaseExceptionHandlerTest.groovy)
	at datadog.trace.agent.test.BaseExceptionHandlerTest$1.<init>(BaseExceptionHandlerTest.groovy)
	at datadog.trace.agent.test.BaseExceptionHandlerTest.$spock_feature_1_1(BaseExceptionHandlerTest.groovy:131)
	...
Caused by: java.lang.ClassNotFoundException: java.lang.Module
	at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
	...
When Groovy compiles this code against JDK 21 **but targeting Java 8**,

```
private static final class MisbehavingClassLoader extends ClassLoader { ... }
```

Groovy will generate super class synthetic accessor methods like

* `super$2$loadClass(Ljava/lang/String;)Ljava/lang/Class;`
* `super$2$loadClass(Ljava/lang/String;Z)Ljava/lang/Class;`
* `super$2$loadClass(Ljava/lang/Module;Ljava/lang/String;)Ljava/lang/Class;`

`java.lang.Module` being missing from Java 8 won't run.

java.lang.NoClassDefFoundError: java/lang/Module
	at java.lang.Class.privateGetDeclaredMethods(Class.java:2729)
	at java.lang.Class.privateGetPublicMethods(Class.java:2930)
	at java.lang.Class.getMethods(Class.java:1643)
	at java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1336)
	at java.beans.Introspector.getTargetMethodInfo(Introspector.java:1197)
	at java.beans.Introspector.getBeanInfo(Introspector.java:426)
	at java.beans.Introspector.getBeanInfo(Introspector.java:173)
	at datadog.trace.civisibility.source.ByteCodeLinesResolverTest.test returns empty method lines when class cannot be loaded(ByteCodeLinesResolverTest.groovy:45)
Caused by: java.lang.ClassNotFoundException: java.lang.Module
	at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
	... 8 more
…ation.

There was a `NoClassDefFoundError` of `java.lang.constant.Constable` when run on JDK8, this happened
because the `Delegate` annotation makes Groovy adds the interfaces of the delegated object to the
enclosing class. Since JDK12 types like `Integer`, `String` implement `Constable` this fails
when the class is loaded on JDK8 or 11.
See groovy/groovy-eclipse#1436

java.lang.NoClassDefFoundError: java/lang/constant/Constable
	at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:473)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
	at com.datadog.appsec.event.data.ObjectIntrospectionSpecification.conversion of an element throws(ObjectIntrospectionSpecification.groovy:305)
Caused by: java.lang.ClassNotFoundException: java.lang.constant.Constable
	at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
	... 11 more
…or getClass on HttpRequest

Instead, the byte code is now an invokevirtual on Object as the javac in JDK8 does
…with new types in JDK9

E.g. methods with `java.sql.ShardingKey`, while these methods are default, Groovy still
implements them (implementation actually invokes the interface default method).

org.gradle.api.internal.tasks.testing.TestSuiteExecutionException: Could not complete execution for Gradle Test Executor 66.
	at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:65)
	...
Caused by: org.junit.platform.commons.JUnitException: TestEngine with ID 'junit-jupiter' failed to discover tests
	at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverEngineRoot(EngineDiscoveryOrchestrator.java:165)
	...
Caused by: org.junit.platform.commons.JUnitException: ClassSelector [className = 'foo.bar.IastInstrumentedConnection', classLoader = sun.misc.Launcher$AppClassLoader@73d16e93] resolution failed
	at org.junit.platform.launcher.listeners.discovery.AbortOnFailureLauncherDiscoveryListener.selectorProcessed(AbortOnFailureLauncherDiscoveryListener.java:39)
	at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.resolveCompletely(EngineDiscoveryRequestResolution.java:103)
	at org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolution.run(EngineDiscoveryRequestResolution.java:83)
	...
Caused by: java.lang.NoClassDefFoundError: java/sql/ShardingKey
	at java.lang.Class.getDeclaredMethods0(Native Method)
	at java.lang.Class.privateGetDeclaredMethods(Class.java:2729)
	at java.lang.Class.privateGetPublicMethods(Class.java:2930)
ProcessManager uses the `CharBuffer.flip` method, which is
coming from the super class in JDK 8 so its signature is
`()Ljava.nio.Buffer`, but since JDK9 `CharBuffer` overrides
it, in the bytecode the signatures becomes `()Ljava.nio.CharBuffer`.

This code fails when running with testJvm=8.
…erface for getClass on HttpRequest"

This reverts commit bc1b15c because muzzle now handles
https://bugs.openjdk.org/browse/JDK-8272715 since #9649
@bric3 bric3 force-pushed the bdu/resume-gradle-toolchain8 branch from a5eec7f to e8ab4c6 Compare October 7, 2025 14:29
@bric3 bric3 enabled auto-merge (squash) October 7, 2025 14:30
@bric3 bric3 merged commit c9c3e60 into master Oct 7, 2025
543 checks passed
@bric3 bric3 deleted the bdu/resume-gradle-toolchain8 branch October 7, 2025 15:24
@github-actions github-actions bot added this to the 1.55.0 milestone Oct 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: tooling Build & Tooling tag: no release notes Changes to exclude from release notes type: enhancement Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants