Skip to content

Conversation

@PerfectSlayer
Copy link
Contributor

@PerfectSlayer PerfectSlayer commented Jul 30, 2025

What Does This Do

This PR brings support for the Structured Concurrency API on JDK 25 related to the JEP 505.

Motivation

Structured Concurrency is still a preview API but is leveraged internally by frameworks and libraries.
In order to not break context tracking, we keep supporting it the preview feature.

Additional Notes

About testing, as there is no current way to run our test framework using Java 25, the related instrumentation tests are done using smoke tests. And as smoke tests don't run either on Java 25, they will run on smoke test job for Java 8, with an hardcoded fork to a JVM 25 to run the tested application.
I would gladly rewriting the test suite as instrumented test as soon as it becomes possible as it will be misleading that Java 8 smoke tests test Java 25 preview feature.

Contributor Checklist

Jira ticket: LANGPLAT-702

@PerfectSlayer PerfectSlayer added type: enhancement Enhancements and improvements inst: java Core Java language instrumentation labels Jul 30, 2025
@pr-commenter
Copy link

pr-commenter bot commented Jul 30, 2025

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master bbujon/concurrency
git_commit_date 1757925137 1757924510
git_commit_sha 1cdab0f050 5d0c1d0
release_version 1.54.0-SNAPSHOT~81cdab0f050 1.54.0-SNAPSHOT~5d0c1d06bb
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1757926401 1757926401
ci_job_id 1128371276 1128371276
ci_pipeline_id 76441786 76441786
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-rzgsap8y 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-rzgsap8y 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 6 performance improvements and 0 performance regressions! Performance is the same for 40 metrics, 13 unstable metrics.

scenario Δ mean execution_time candidate mean execution_time baseline mean execution_time
scenario:startup:insecure-bank:iast:GlobalTracer better
[-15.707ms; -8.658ms] or [-6.358%; -3.504%]
234.872ms 247.054ms
scenario:startup:insecure-bank:tracing:GlobalTracer better
[-15.323ms; -8.540ms] or [-6.019%; -3.355%]
242.650ms 254.581ms
scenario:startup:petclinic:appsec:GlobalTracer better
[-12.202ms; -9.491ms] or [-4.954%; -3.854%]
235.447ms 246.294ms
scenario:startup:petclinic:iast:GlobalTracer better
[-16.368ms; -10.009ms] or [-6.641%; -4.061%]
233.294ms 246.483ms
scenario:startup:petclinic:profiling:GlobalTracer better
[-11.298ms; -8.837ms] or [-4.847%; -3.791%]
223.018ms 233.086ms
scenario:startup:petclinic:tracing:GlobalTracer better
[-15.082ms; -8.397ms] or [-5.932%; -3.303%]
242.499ms 254.239ms
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.54.0-SNAPSHOT~5d0c1d06bb, baseline=1.54.0-SNAPSHOT~81cdab0f050

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.071 s) : 0, 1071000
Total [baseline] (8.675 s) : 0, 8674806
Agent [candidate] (1.047 s) : 0, 1047443
Total [candidate] (8.625 s) : 0, 8625424
section iast
Agent [baseline] (1.194 s) : 0, 1193886
Total [baseline] (9.315 s) : 0, 9314776
Agent [candidate] (1.19 s) : 0, 1190113
Total [candidate] (9.369 s) : 0, 9369074
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.071 s -
Agent iast 1.194 s 122.886 ms (11.5%)
Total tracing 8.675 s -
Total iast 9.315 s 639.97 ms (7.4%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.047 s -
Agent iast 1.19 s 142.67 ms (13.6%)
Total tracing 8.625 s -
Total iast 9.369 s 743.65 ms (8.6%)
gantt
    title insecure-bank - break down per module: candidate=1.54.0-SNAPSHOT~5d0c1d06bb, baseline=1.54.0-SNAPSHOT~81cdab0f050

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.465 ms) : 0, 1465
crashtracking [candidate] (1.459 ms) : 0, 1459
BytebuddyAgent [baseline] (739.133 ms) : 0, 739133
BytebuddyAgent [candidate] (734.099 ms) : 0, 734099
GlobalTracer [baseline] (254.581 ms) : 0, 254581
GlobalTracer [candidate] (242.65 ms) : 0, 242650
AppSec [baseline] (30.886 ms) : 0, 30886
AppSec [candidate] (30.162 ms) : 0, 30162
Debugger [baseline] (6.465 ms) : 0, 6465
Debugger [candidate] (6.427 ms) : 0, 6427
Remote Config [baseline] (700.984 µs) : 0, 701
Remote Config [candidate] (693.787 µs) : 0, 694
Telemetry [baseline] (16.526 ms) : 0, 16526
Telemetry [candidate] (10.932 ms) : 0, 10932
section iast
crashtracking [baseline] (1.47 ms) : 0, 1470
crashtracking [candidate] (1.461 ms) : 0, 1461
BytebuddyAgent [baseline] (856.067 ms) : 0, 856067
BytebuddyAgent [candidate] (859.267 ms) : 0, 859267
GlobalTracer [baseline] (247.054 ms) : 0, 247054
GlobalTracer [candidate] (234.872 ms) : 0, 234872
AppSec [baseline] (24.631 ms) : 0, 24631
AppSec [candidate] (25.462 ms) : 0, 25462
Debugger [baseline] (6.044 ms) : 0, 6044
Debugger [candidate] (7.808 ms) : 0, 7808
Remote Config [baseline] (608.134 µs) : 0, 608
Remote Config [candidate] (609.766 µs) : 0, 610
Telemetry [baseline] (8.144 ms) : 0, 8144
Telemetry [candidate] (8.264 ms) : 0, 8264
IAST [baseline] (28.857 ms) : 0, 28857
IAST [candidate] (31.273 ms) : 0, 31273
Loading
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.54.0-SNAPSHOT~5d0c1d06bb, baseline=1.54.0-SNAPSHOT~81cdab0f050

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.07 s) : 0, 1070444
Total [baseline] (10.759 s) : 0, 10758671
Agent [candidate] (1.046 s) : 0, 1046254
Total [candidate] (10.782 s) : 0, 10781535
section appsec
Agent [baseline] (1.237 s) : 0, 1236703
Total [baseline] (10.937 s) : 0, 10937043
Agent [candidate] (1.223 s) : 0, 1222551
Total [candidate] (10.803 s) : 0, 10803194
section iast
Agent [baseline] (1.19 s) : 0, 1189757
Total [baseline] (11.074 s) : 0, 11073793
Agent [candidate] (1.18 s) : 0, 1179790
Total [candidate] (10.909 s) : 0, 10908938
section profiling
Agent [baseline] (1.208 s) : 0, 1208326
Total [baseline] (10.926 s) : 0, 10925823
Agent [candidate] (1.2 s) : 0, 1200153
Total [candidate] (11.015 s) : 0, 11015028
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.07 s -
Agent appsec 1.237 s 166.259 ms (15.5%)
Agent iast 1.19 s 119.313 ms (11.1%)
Agent profiling 1.208 s 137.882 ms (12.9%)
Total tracing 10.759 s -
Total appsec 10.937 s 178.373 ms (1.7%)
Total iast 11.074 s 315.122 ms (2.9%)
Total profiling 10.926 s 167.152 ms (1.6%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.046 s -
Agent appsec 1.223 s 176.297 ms (16.9%)
Agent iast 1.18 s 133.535 ms (12.8%)
Agent profiling 1.2 s 153.899 ms (14.7%)
Total tracing 10.782 s -
Total appsec 10.803 s 21.659 ms (0.2%)
Total iast 10.909 s 127.404 ms (1.2%)
Total profiling 11.015 s 233.494 ms (2.2%)
gantt
    title petclinic - break down per module: candidate=1.54.0-SNAPSHOT~5d0c1d06bb, baseline=1.54.0-SNAPSHOT~81cdab0f050

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.477 ms) : 0, 1477
crashtracking [candidate] (1.449 ms) : 0, 1449
BytebuddyAgent [baseline] (738.881 ms) : 0, 738881
BytebuddyAgent [candidate] (732.269 ms) : 0, 732269
GlobalTracer [baseline] (254.239 ms) : 0, 254239
GlobalTracer [candidate] (242.499 ms) : 0, 242499
AppSec [baseline] (30.885 ms) : 0, 30885
AppSec [candidate] (30.082 ms) : 0, 30082
Debugger [baseline] (6.461 ms) : 0, 6461
Debugger [candidate] (6.461 ms) : 0, 6461
Remote Config [baseline] (707.782 µs) : 0, 708
Remote Config [candidate] (687.404 µs) : 0, 687
Telemetry [baseline] (16.422 ms) : 0, 16422
Telemetry [candidate] (11.697 ms) : 0, 11697
section appsec
crashtracking [baseline] (1.46 ms) : 0, 1460
crashtracking [candidate] (1.459 ms) : 0, 1459
BytebuddyAgent [baseline] (757.004 ms) : 0, 757004
BytebuddyAgent [candidate] (754.417 ms) : 0, 754417
GlobalTracer [baseline] (246.294 ms) : 0, 246294
GlobalTracer [candidate] (235.447 ms) : 0, 235447
AppSec [baseline] (171.841 ms) : 0, 171841
AppSec [candidate] (168.472 ms) : 0, 168472
Debugger [baseline] (6.046 ms) : 0, 6046
Debugger [candidate] (7.569 ms) : 0, 7569
Remote Config [baseline] (625.58 µs) : 0, 626
Remote Config [candidate] (659.349 µs) : 0, 659
Telemetry [baseline] (8.375 ms) : 0, 8375
Telemetry [candidate] (10.018 ms) : 0, 10018
IAST [baseline] (23.761 ms) : 0, 23761
IAST [candidate] (23.43 ms) : 0, 23430
section iast
crashtracking [baseline] (1.455 ms) : 0, 1455
crashtracking [candidate] (1.479 ms) : 0, 1479
BytebuddyAgent [baseline] (851.613 ms) : 0, 851613
BytebuddyAgent [candidate] (851.009 ms) : 0, 851009
GlobalTracer [baseline] (246.483 ms) : 0, 246483
GlobalTracer [candidate] (233.294 ms) : 0, 233294
AppSec [baseline] (24.622 ms) : 0, 24622
AppSec [candidate] (26.822 ms) : 0, 26822
Debugger [baseline] (6.025 ms) : 0, 6025
Debugger [candidate] (7.007 ms) : 0, 7007
Remote Config [baseline] (589.426 µs) : 0, 589
Remote Config [candidate] (599.274 µs) : 0, 599
Telemetry [baseline] (8.099 ms) : 0, 8099
Telemetry [candidate] (8.298 ms) : 0, 8298
IAST [baseline] (29.77 ms) : 0, 29770
IAST [candidate] (30.208 ms) : 0, 30208
section profiling
ProfilingAgent [baseline] (107.782 ms) : 0, 107782
ProfilingAgent [candidate] (108.168 ms) : 0, 108168
crashtracking [baseline] (1.425 ms) : 0, 1425
crashtracking [candidate] (1.431 ms) : 0, 1431
BytebuddyAgent [baseline] (760.934 ms) : 0, 760934
BytebuddyAgent [candidate] (762.752 ms) : 0, 762752
GlobalTracer [baseline] (233.086 ms) : 0, 233086
GlobalTracer [candidate] (223.018 ms) : 0, 223018
AppSec [baseline] (31.046 ms) : 0, 31046
AppSec [candidate] (30.578 ms) : 0, 30578
Debugger [baseline] (7.384 ms) : 0, 7384
Debugger [candidate] (6.759 ms) : 0, 6759
Remote Config [baseline] (702.457 µs) : 0, 702
Remote Config [candidate] (680.341 µs) : 0, 680
Telemetry [baseline] (14.848 ms) : 0, 14848
Telemetry [candidate] (16.281 ms) : 0, 16281
Profiling [baseline] (108.431 ms) : 0, 108431
Profiling [candidate] (108.917 ms) : 0, 108917
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master bbujon/concurrency
git_commit_date 1757925138 1757924510
git_commit_sha 1cdab0f050 5d0c1d0
release_version 1.54.0-SNAPSHOT~81cdab0f050 1.54.0-SNAPSHOT~5d0c1d06bb
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1757926065 1757926065
ci_job_id 1128371277 1128371277
ci_pipeline_id 76441786 76441786
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-1-7xo1arc3 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-1-7xo1arc3 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 1 performance improvements and 2 performance regressions! Performance is the same for 9 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:iast_GLOBAL:high_load better
[-693.464µs; -289.226µs] or [-6.436%; -2.684%]
unstable
[-29.044op/s; +70.294op/s] or [-6.733%; +16.296%]
10.283ms 451.969op/s 10.774ms 431.344op/s
scenario:load:petclinic:appsec:high_load worse
[+2.230ms; +3.128ms] or [+4.772%; +6.692%]
unstable
[-12.352op/s; +1.502op/s] or [-12.335%; +1.500%]
49.417ms 94.713op/s 46.738ms 100.138op/s
scenario:load:petclinic:profiling:high_load worse
[+2.552ms; +3.522ms] or [+5.475%; +7.554%]
unstable
[-13.200op/s; +0.925op/s] or [-13.151%; +0.922%]
49.657ms 94.237op/s 46.620ms 100.375op/s
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.54.0-SNAPSHOT~5d0c1d06bb, baseline=1.54.0-SNAPSHOT~81cdab0f050
    dateFormat X
    axisFormat %s
section baseline
no_agent (4.405 ms) : 4356, 4455
.   : milestone, 4405,
iast (9.566 ms) : 9392, 9739
.   : milestone, 9566,
iast_FULL (13.81 ms) : 13536, 14084
.   : milestone, 13810,
iast_GLOBAL (10.774 ms) : 10580, 10968
.   : milestone, 10774,
profiling (8.907 ms) : 8768, 9046
.   : milestone, 8907,
tracing (7.863 ms) : 7742, 7983
.   : milestone, 7863,
section candidate
no_agent (4.364 ms) : 4314, 4413
.   : milestone, 4364,
iast (9.656 ms) : 9493, 9820
.   : milestone, 9656,
iast_FULL (14.235 ms) : 13948, 14522
.   : milestone, 14235,
iast_GLOBAL (10.283 ms) : 10102, 10464
.   : milestone, 10283,
profiling (8.776 ms) : 8640, 8912
.   : milestone, 8776,
tracing (7.921 ms) : 7805, 8038
.   : milestone, 7921,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 4.405 ms [4.356 ms, 4.455 ms] -
iast 9.566 ms [9.392 ms, 9.739 ms] 5.16 ms (117.1%)
iast_FULL 13.81 ms [13.536 ms, 14.084 ms] 9.405 ms (213.5%)
iast_GLOBAL 10.774 ms [10.58 ms, 10.968 ms] 6.369 ms (144.6%)
profiling 8.907 ms [8.768 ms, 9.046 ms] 4.502 ms (102.2%)
tracing 7.863 ms [7.742 ms, 7.983 ms] 3.457 ms (78.5%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 4.364 ms [4.314 ms, 4.413 ms] -
iast 9.656 ms [9.493 ms, 9.82 ms] 5.293 ms (121.3%)
iast_FULL 14.235 ms [13.948 ms, 14.522 ms] 9.872 ms (226.2%)
iast_GLOBAL 10.283 ms [10.102 ms, 10.464 ms] 5.919 ms (135.6%)
profiling 8.776 ms [8.64 ms, 8.912 ms] 4.413 ms (101.1%)
tracing 7.921 ms [7.805 ms, 8.038 ms] 3.558 ms (81.5%)
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.54.0-SNAPSHOT~5d0c1d06bb, baseline=1.54.0-SNAPSHOT~81cdab0f050
    dateFormat X
    axisFormat %s
section baseline
no_agent (37.856 ms) : 37545, 38167
.   : milestone, 37856,
appsec (46.738 ms) : 46339, 47137
.   : milestone, 46738,
code_origins (44.491 ms) : 44111, 44871
.   : milestone, 44491,
iast (44.855 ms) : 44463, 45247
.   : milestone, 44855,
profiling (46.62 ms) : 46201, 47039
.   : milestone, 46620,
tracing (44.956 ms) : 44570, 45341
.   : milestone, 44956,
section candidate
no_agent (37.773 ms) : 37462, 38084
.   : milestone, 37773,
appsec (49.417 ms) : 48983, 49851
.   : milestone, 49417,
code_origins (44.1 ms) : 43707, 44492
.   : milestone, 44100,
iast (45.885 ms) : 45492, 46278
.   : milestone, 45885,
profiling (49.657 ms) : 49177, 50136
.   : milestone, 49657,
tracing (44.193 ms) : 43812, 44575
.   : milestone, 44193,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 37.856 ms [37.545 ms, 38.167 ms] -
appsec 46.738 ms [46.339 ms, 47.137 ms] 8.882 ms (23.5%)
code_origins 44.491 ms [44.111 ms, 44.871 ms] 6.635 ms (17.5%)
iast 44.855 ms [44.463 ms, 45.247 ms] 6.999 ms (18.5%)
profiling 46.62 ms [46.201 ms, 47.039 ms] 8.764 ms (23.1%)
tracing 44.956 ms [44.57 ms, 45.341 ms] 7.1 ms (18.8%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 37.773 ms [37.462 ms, 38.084 ms] -
appsec 49.417 ms [48.983 ms, 49.851 ms] 11.644 ms (30.8%)
code_origins 44.1 ms [43.707 ms, 44.492 ms] 6.326 ms (16.7%)
iast 45.885 ms [45.492 ms, 46.278 ms] 8.112 ms (21.5%)
profiling 49.657 ms [49.177 ms, 50.136 ms] 11.883 ms (31.5%)
tracing 44.193 ms [43.812 ms, 44.575 ms] 6.42 ms (17.0%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master bbujon/concurrency
git_commit_date 1757925142 1757924510
git_commit_sha 1cdab0f050 5d0c1d0
release_version 1.54.0-SNAPSHOT~81cdab0f050 1.54.0-SNAPSHOT~5d0c1d06bb
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1757926558 1757926558
ci_job_id 1128371278 1128371278
ci_pipeline_id 76441786 76441786
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-iefi0ksa 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-iefi0ksa 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.54.0-SNAPSHOT~5d0c1d06bb, baseline=1.54.0-SNAPSHOT~81cdab0f050
    dateFormat X
    axisFormat %s
section baseline
no_agent (14.78 s) : 14780000, 14780000
.   : milestone, 14780000,
appsec (14.739 s) : 14739000, 14739000
.   : milestone, 14739000,
iast (18.508 s) : 18508000, 18508000
.   : milestone, 18508000,
iast_GLOBAL (18.131 s) : 18131000, 18131000
.   : milestone, 18131000,
profiling (15.478 s) : 15478000, 15478000
.   : milestone, 15478000,
tracing (15.07 s) : 15070000, 15070000
.   : milestone, 15070000,
section candidate
no_agent (15.573 s) : 15573000, 15573000
.   : milestone, 15573000,
appsec (14.73 s) : 14730000, 14730000
.   : milestone, 14730000,
iast (18.405 s) : 18405000, 18405000
.   : milestone, 18405000,
iast_GLOBAL (17.943 s) : 17943000, 17943000
.   : milestone, 17943000,
profiling (15.465 s) : 15465000, 15465000
.   : milestone, 15465000,
tracing (14.809 s) : 14809000, 14809000
.   : milestone, 14809000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.78 s [14.78 s, 14.78 s] -
appsec 14.739 s [14.739 s, 14.739 s] -41.0 ms (-0.3%)
iast 18.508 s [18.508 s, 18.508 s] 3.728 s (25.2%)
iast_GLOBAL 18.131 s [18.131 s, 18.131 s] 3.351 s (22.7%)
profiling 15.478 s [15.478 s, 15.478 s] 698.0 ms (4.7%)
tracing 15.07 s [15.07 s, 15.07 s] 290.0 ms (2.0%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.573 s [15.573 s, 15.573 s] -
appsec 14.73 s [14.73 s, 14.73 s] -843.0 ms (-5.4%)
iast 18.405 s [18.405 s, 18.405 s] 2.832 s (18.2%)
iast_GLOBAL 17.943 s [17.943 s, 17.943 s] 2.37 s (15.2%)
profiling 15.465 s [15.465 s, 15.465 s] -108.0 ms (-0.7%)
tracing 14.809 s [14.809 s, 14.809 s] -764.0 ms (-4.9%)
Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.54.0-SNAPSHOT~5d0c1d06bb, baseline=1.54.0-SNAPSHOT~81cdab0f050
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.472 ms) : 1460, 1483
.   : milestone, 1472,
appsec (3.687 ms) : 3471, 3903
.   : milestone, 3687,
iast (2.187 ms) : 2125, 2250
.   : milestone, 2187,
iast_GLOBAL (2.228 ms) : 2165, 2291
.   : milestone, 2228,
profiling (2.047 ms) : 1995, 2098
.   : milestone, 2047,
tracing (2.019 ms) : 1969, 2068
.   : milestone, 2019,
section candidate
no_agent (1.474 ms) : 1463, 1486
.   : milestone, 1474,
appsec (3.628 ms) : 3412, 3845
.   : milestone, 3628,
iast (2.191 ms) : 2129, 2254
.   : milestone, 2191,
iast_GLOBAL (2.234 ms) : 2171, 2297
.   : milestone, 2234,
profiling (2.048 ms) : 1996, 2100
.   : milestone, 2048,
tracing (2.011 ms) : 1962, 2059
.   : milestone, 2011,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.472 ms [1.46 ms, 1.483 ms] -
appsec 3.687 ms [3.471 ms, 3.903 ms] 2.215 ms (150.5%)
iast 2.187 ms [2.125 ms, 2.25 ms] 715.368 µs (48.6%)
iast_GLOBAL 2.228 ms [2.165 ms, 2.291 ms] 756.133 µs (51.4%)
profiling 2.047 ms [1.995 ms, 2.098 ms] 574.697 µs (39.0%)
tracing 2.019 ms [1.969 ms, 2.068 ms] 546.801 µs (37.1%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.474 ms [1.463 ms, 1.486 ms] -
appsec 3.628 ms [3.412 ms, 3.845 ms] 2.154 ms (146.1%)
iast 2.191 ms [2.129 ms, 2.254 ms] 717.064 µs (48.6%)
iast_GLOBAL 2.234 ms [2.171 ms, 2.297 ms] 759.676 µs (51.5%)
profiling 2.048 ms [1.996 ms, 2.1 ms] 573.771 µs (38.9%)
tracing 2.011 ms [1.962 ms, 2.059 ms] 536.434 µs (36.4%)

Copy link
Contributor

@AlexeyKuznetsov-DD AlexeyKuznetsov-DD left a comment

Choose a reason for hiding this comment

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

LGTM in general, left couple of minor comments.

Comment on lines 1 to 4
ext {
minJavaVersionForTests = JavaVersion.VERSION_25
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: how about to use Kotlin DSL for new build.gradle?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would rather wait for having a clear migration path rather than trying to build new conventions and plugins as part of this PR. WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think that using kotlin DSL is gonna change that or not. However it clearly help IDE support now. In my opinion I would try to use kotlin DSL regardless. This can also help exercise our skills in that regard.

That said while I would prefer kotlin dsl usage regardless, I won't push for it either at this time.

org.gradle.java.installations.auto-download=false
# 8 and 11 is needed to build
org.gradle.java.installations.fromEnv=JAVA_8_HOME,JAVA_11_HOME,JAVA_17_HOME,JAVA_21_HOME
org.gradle.java.installations.fromEnv=JAVA_8_HOME,JAVA_11_HOME,JAVA_17_HOME,JAVA_21_HOME,JAVA_25_HOME
Copy link
Contributor

Choose a reason for hiding this comment

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

BTW, should we have JAVA_24_HOME too?
cc: @sarahchen6

Copy link
Contributor

@sarahchen6 sarahchen6 Jul 30, 2025

Choose a reason for hiding this comment

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

Hm 🤔 Since we don't build anything in Java 24 (only test), I don't think we need it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It feels like we should move to some other mechanism to detect JVMs...
Gradle seems to have modern provider and discovery mechanism.
It could be interesting to have a look as part of a broader refactoring cc @bric3

Copy link
Contributor Author

@PerfectSlayer PerfectSlayer Jul 31, 2025

Choose a reason for hiding this comment

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

It seems like finding JAVA_24_HOME here for tests is sufficient

It should be for -PtestJvm=stable yes 👍

Copy link
Contributor

Choose a reason for hiding this comment

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

@sarahchen6 I recall that we have idea to rename stable to something like latest-non-lts?
WDYT on renaming?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, I remember we didn't go through with it because of the idea that the build image should always provide the latest "stable" version in addition to specific LTS versions that we want to test. It is on the CI, not the available build images, to avoid duplicate testing (i.e. we do not test stable when stable == LTS). There is a conversation on this PR for more context: DataDog/dd-trace-java-docker-build#107

Comment on lines 1 to 4
ext {
minJavaVersionForTests = JavaVersion.VERSION_25
}

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think that using kotlin DSL is gonna change that or not. However it clearly help IDE support now. In my opinion I would try to use kotlin DSL regardless. This can also help exercise our skills in that regard.

That said while I would prefer kotlin dsl usage regardless, I won't push for it either at this time.

Comment on lines 48 to 51
// Set all compile tasks to use JDK21 but let instrumentation code targets 1.8 compatibility
project.tasks.withType(AbstractCompile).configureEach {
setJavaVersion(it, 25)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion:

Suggested change
// Set all compile tasks to use JDK21 but let instrumentation code targets 1.8 compatibility
project.tasks.withType(AbstractCompile).configureEach {
setJavaVersion(it, 25)
}
// Sets all compile tasks to use JDK25 but ensures instrumentation code still targets 1.8 compatibility
project.tasks.withType(AbstractCompile).configureEach {
setJavaVersion(it, 25)
}

}

dependencies {
testImplementation project(':dd-java-agent:instrumentation:trace-annotation')
Copy link
Contributor

Choose a reason for hiding this comment

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

@datadog-official
Copy link

datadog-official bot commented Sep 12, 2025

🎯 Code Coverage
Patch Coverage: 100.00%
Total Coverage: 60.10% (-0.06%)

View detailed report

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

Add instrumentation alias
Limit activation to Java < 25
Fix context store declaration and usage to match RunnableInstrumentation
Remove unused generic
@PerfectSlayer PerfectSlayer force-pushed the bbujon/concurrency branch 2 times, most recently from 9c0d9bb to d24dfed Compare September 12, 2025 08:17
@PerfectSlayer PerfectSlayer marked this pull request as ready for review September 12, 2025 08:18
@PerfectSlayer PerfectSlayer requested review from a team as code owners September 12, 2025 08:18
@PerfectSlayer PerfectSlayer requested review from AlexeyKuznetsov-DD, bric3, dougqh and sarahchen6 and removed request for a team September 12, 2025 08:18
@PerfectSlayer
Copy link
Contributor Author

PerfectSlayer commented Sep 12, 2025

Re-requesting reviews as most of the content changed from the original draft.

import net.bytebuddy.asm.Advice.This;

// WARNING:
// This instrumentation is tested using smoke tests as instrumented tests cannot run using Java 25.
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add description of WHY it cannot run?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sadly I did not keep track of all the failures.
The first immediate one that come to mind would be that our Groovy version won't run using Java 25 but there are more reasons. Would it make to document them as our goal next quarter will be to get rid of all of this?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yep

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added the groovy / spock rationale to the comment then 👍

Comment on lines +39 to +48
// Disable plugin tasks that do not support Java 25:
// * forbiddenApis is missing classes
// * spotless as the google-java-format version does not support Java 25 and can't be changed once applied
// * spotbugs failed to read class using newer bytecode versions
forbiddenApisMain {
failOnMissingClasses = false
}
['spotlessApply', 'spotlessCheck', 'spotlessJava', 'spotbugsMain'].each {
tasks.named(it).configure { enabled = false }
}
Copy link
Contributor

Choose a reason for hiding this comment

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

@bric3 if we decouple Gradle JDK this should be fixed?
@PerfectSlayer Maybe we should try to use forbiddenApi v3.9?
I can see this PR Update ASM to version 9.8 for support of Java 25 bytecode; add signatures and build support for Java 24 GA

Copy link
Contributor Author

@PerfectSlayer PerfectSlayer Sep 12, 2025

Choose a reason for hiding this comment

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

Sure, you can try to update it and I can test it there to see if I can active it in this module.
For info, the :java-21 module is also disabling those plugins as not working with 21 either 😞

@PerfectSlayer PerfectSlayer enabled auto-merge (squash) September 15, 2025 08:26
@PerfectSlayer PerfectSlayer merged commit dacc5a5 into master Sep 15, 2025
504 checks passed
@PerfectSlayer PerfectSlayer deleted the bbujon/concurrency branch September 15, 2025 09:55
@github-actions github-actions bot added this to the 1.54.0 milestone Sep 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

inst: java Core Java language instrumentation type: enhancement Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants