Skip to content

Use JDK 8 explicitly as toolchain #8883

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

Conversation

smola
Copy link
Member

@smola smola commented May 26, 2025

What Does This Do

Use JDK 8 by default, explicitly, to allow running gradle with newer JDKs.

Motivation

Additional Notes

Contributor Checklist

Jira ticket: APMJAVA-1342

@smola smola added tag: no release notes Changes to exclude from release notes comp: tooling Build & Tooling labels May 26, 2025
@pr-commenter
Copy link

pr-commenter bot commented May 26, 2025

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master smola/gradle-3-toolchain8
git_commit_date 1750453785 1750658366
git_commit_sha aa9dd27 b2e8d4e
release_version 1.51.0-SNAPSHOT~aa9dd27535 1.51.0-SNAPSHOT~b2e8d4e670
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1750660333 1750660333
ci_job_id 992770554 992770554
ci_pipeline_id 68420324 68420324
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-bziamzy-project-304-concurrent-2-vomnidc9 6.8.0-1029-aws #31~22.04.1-Ubuntu SMP Thu Apr 24 21:16:18 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-bziamzy-project-304-concurrent-2-vomnidc9 6.8.0-1029-aws #31~22.04.1-Ubuntu SMP Thu Apr 24 21:16:18 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 43 metrics, 10 unstable metrics.

Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.51.0-SNAPSHOT~b2e8d4e670, baseline=1.51.0-SNAPSHOT~aa9dd27535

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.028 s) : 0, 1027876
Total [baseline] (8.587 s) : 0, 8587319
Agent [candidate] (1.027 s) : 0, 1027305
Total [candidate] (8.548 s) : 0, 8547988
section iast
Agent [baseline] (1.175 s) : 0, 1174692
Total [baseline] (9.268 s) : 0, 9268420
Agent [candidate] (1.151 s) : 0, 1151054
Total [candidate] (9.192 s) : 0, 9191998
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.028 s -
Agent iast 1.175 s 146.817 ms (14.3%)
Total tracing 8.587 s -
Total iast 9.268 s 681.101 ms (7.9%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.027 s -
Agent iast 1.151 s 123.749 ms (12.0%)
Total tracing 8.548 s -
Total iast 9.192 s 644.009 ms (7.5%)
gantt
    title insecure-bank - break down per module: candidate=1.51.0-SNAPSHOT~b2e8d4e670, baseline=1.51.0-SNAPSHOT~aa9dd27535

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (687.383 ms) : 0, 687383
BytebuddyAgent [candidate] (687.452 ms) : 0, 687452
GlobalTracer [baseline] (242.635 ms) : 0, 242635
GlobalTracer [candidate] (242.683 ms) : 0, 242683
AppSec [baseline] (57.907 ms) : 0, 57907
AppSec [candidate] (57.384 ms) : 0, 57384
Debugger [baseline] (7.018 ms) : 0, 7018
Debugger [candidate] (7.771 ms) : 0, 7771
Remote Config [baseline] (670.728 µs) : 0, 671
Remote Config [candidate] (661.683 µs) : 0, 662
Telemetry [baseline] (11.338 ms) : 0, 11338
Telemetry [candidate] (10.454 ms) : 0, 10454
section iast
BytebuddyAgent [baseline] (824.488 ms) : 0, 824488
BytebuddyAgent [candidate] (805.24 ms) : 0, 805240
GlobalTracer [baseline] (234.625 ms) : 0, 234625
GlobalTracer [candidate] (231.631 ms) : 0, 231631
IAST [baseline] (27.774 ms) : 0, 27774
IAST [candidate] (27.415 ms) : 0, 27415
AppSec [baseline] (52.053 ms) : 0, 52053
AppSec [candidate] (51.576 ms) : 0, 51576
Debugger [baseline] (5.952 ms) : 0, 5952
Debugger [candidate] (5.931 ms) : 0, 5931
Remote Config [baseline] (600.347 µs) : 0, 600
Remote Config [candidate] (600.98 µs) : 0, 601
Telemetry [baseline] (8.074 ms) : 0, 8074
Telemetry [candidate] (7.925 ms) : 0, 7925
Loading
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.51.0-SNAPSHOT~b2e8d4e670, baseline=1.51.0-SNAPSHOT~aa9dd27535

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.025 s) : 0, 1025370
Total [baseline] (10.587 s) : 0, 10587389
Agent [candidate] (1.026 s) : 0, 1025876
Total [candidate] (10.558 s) : 0, 10557831
section appsec
Agent [baseline] (1.179 s) : 0, 1178953
Total [baseline] (10.722 s) : 0, 10721684
Agent [candidate] (1.178 s) : 0, 1178354
Total [candidate] (10.703 s) : 0, 10702697
section iast
Agent [baseline] (1.151 s) : 0, 1151376
Total [baseline] (10.879 s) : 0, 10878813
Agent [candidate] (1.152 s) : 0, 1152300
Total [candidate] (10.953 s) : 0, 10953460
section profiling
Agent [baseline] (1.278 s) : 0, 1278027
Total [baseline] (10.885 s) : 0, 10885497
Agent [candidate] (1.27 s) : 0, 1270414
Total [candidate] (10.966 s) : 0, 10966034
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.025 s -
Agent appsec 1.179 s 153.582 ms (15.0%)
Agent iast 1.151 s 126.006 ms (12.3%)
Agent profiling 1.278 s 252.657 ms (24.6%)
Total tracing 10.587 s -
Total appsec 10.722 s 134.295 ms (1.3%)
Total iast 10.879 s 291.424 ms (2.8%)
Total profiling 10.885 s 298.108 ms (2.8%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.026 s -
Agent appsec 1.178 s 152.479 ms (14.9%)
Agent iast 1.152 s 126.424 ms (12.3%)
Agent profiling 1.27 s 244.538 ms (23.8%)
Total tracing 10.558 s -
Total appsec 10.703 s 144.865 ms (1.4%)
Total iast 10.953 s 395.628 ms (3.7%)
Total profiling 10.966 s 408.202 ms (3.9%)
gantt
    title petclinic - break down per module: candidate=1.51.0-SNAPSHOT~b2e8d4e670, baseline=1.51.0-SNAPSHOT~aa9dd27535

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (685.336 ms) : 0, 685336
BytebuddyAgent [candidate] (685.59 ms) : 0, 685590
GlobalTracer [baseline] (242.133 ms) : 0, 242133
GlobalTracer [candidate] (242.307 ms) : 0, 242307
AppSec [baseline] (56.472 ms) : 0, 56472
AppSec [candidate] (59.232 ms) : 0, 59232
Debugger [baseline] (7.801 ms) : 0, 7801
Debugger [candidate] (6.22 ms) : 0, 6220
Remote Config [baseline] (675.037 µs) : 0, 675
Remote Config [candidate] (657.197 µs) : 0, 657
Telemetry [baseline] (12.105 ms) : 0, 12105
Telemetry [candidate] (10.997 ms) : 0, 10997
section appsec
BytebuddyAgent [baseline] (709.082 ms) : 0, 709082
BytebuddyAgent [candidate] (707.729 ms) : 0, 707729
GlobalTracer [baseline] (235.042 ms) : 0, 235042
GlobalTracer [candidate] (235.36 ms) : 0, 235360
IAST [baseline] (21.78 ms) : 0, 21780
IAST [candidate] (21.757 ms) : 0, 21757
AppSec [baseline] (178.719 ms) : 0, 178719
AppSec [candidate] (179.078 ms) : 0, 179078
Debugger [baseline] (5.751 ms) : 0, 5751
Debugger [candidate] (5.821 ms) : 0, 5821
Remote Config [baseline] (607.782 µs) : 0, 608
Remote Config [candidate] (615.962 µs) : 0, 616
Telemetry [baseline] (7.183 ms) : 0, 7183
Telemetry [candidate] (7.24 ms) : 0, 7240
section iast
BytebuddyAgent [baseline] (805.83 ms) : 0, 805830
BytebuddyAgent [candidate] (806.27 ms) : 0, 806270
GlobalTracer [baseline] (231.596 ms) : 0, 231596
GlobalTracer [candidate] (231.722 ms) : 0, 231722
IAST [baseline] (29.763 ms) : 0, 29763
IAST [candidate] (27.486 ms) : 0, 27486
AppSec [baseline] (48.933 ms) : 0, 48933
AppSec [candidate] (51.371 ms) : 0, 51371
Debugger [baseline] (5.941 ms) : 0, 5941
Debugger [candidate] (5.925 ms) : 0, 5925
Remote Config [baseline] (617.374 µs) : 0, 617
Remote Config [candidate] (608.132 µs) : 0, 608
Telemetry [baseline] (7.947 ms) : 0, 7947
Telemetry [candidate] (8.008 ms) : 0, 8008
section profiling
BytebuddyAgent [baseline] (681.975 ms) : 0, 681975
BytebuddyAgent [candidate] (678.44 ms) : 0, 678440
GlobalTracer [baseline] (362.853 ms) : 0, 362853
GlobalTracer [candidate] (360.666 ms) : 0, 360666
AppSec [baseline] (62.389 ms) : 0, 62389
AppSec [candidate] (62.063 ms) : 0, 62063
Debugger [baseline] (6.18 ms) : 0, 6180
Debugger [candidate] (6.14 ms) : 0, 6140
Remote Config [baseline] (713.152 µs) : 0, 713
Remote Config [candidate] (704.086 µs) : 0, 704
Telemetry [baseline] (8.138 ms) : 0, 8138
Telemetry [candidate] (8.142 ms) : 0, 8142
ProfilingAgent [baseline] (106.764 ms) : 0, 106764
ProfilingAgent [candidate] (105.558 ms) : 0, 105558
Profiling [baseline] (106.79 ms) : 0, 106790
Profiling [candidate] (105.583 ms) : 0, 105583
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master smola/gradle-3-toolchain8
git_commit_date 1750453785 1750658366
git_commit_sha aa9dd27 b2e8d4e
release_version 1.51.0-SNAPSHOT~aa9dd27535 1.51.0-SNAPSHOT~b2e8d4e670
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1750660041 1750660041
ci_job_id 992770555 992770555
ci_pipeline_id 68420324 68420324
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-pw1nxbd:project-304-concurrent-1-w4t8yej1 6.8.0-1029-aws #31~22.04.1-Ubuntu SMP Thu Apr 24 21:16:18 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-pw1nxbd:project-304-concurrent-1-w4t8yej1 6.8.0-1029-aws #31~22.04.1-Ubuntu SMP Thu Apr 24 21:16:18 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Summary

Found 2 performance improvements and 2 performance regressions! Performance is the same for 8 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:no_agent:high_load worse
[+150.254µs; +259.145µs] or [+3.415%; +5.890%]
unstable
[-154.599op/s; +64.037op/s] or [-14.823%; +6.140%]
4.605ms 997.688op/s 4.400ms 1042.969op/s
scenario:load:insecure-bank:tracing:high_load worse
[+214.197µs; +466.778µs] or [+2.843%; +6.195%]
unstable
[-99.278op/s; +46.590op/s] or [-16.153%; +7.580%]
7.875ms 588.281op/s 7.534ms 614.625op/s
scenario:load:petclinic:profiling:high_load better
[-2.209ms; -1.150ms] or [-4.326%; -2.253%]
unstable
[-3.762op/s; +9.887op/s] or [-4.102%; +10.782%]
49.371ms 94.763op/s 51.051ms 91.700op/s
scenario:load:petclinic:appsec:high_load better
[-5.363ms; -4.452ms] or [-10.589%; -8.790%]
unstable
[+2.979op/s; +16.646op/s] or [+3.222%; +18.008%]
45.738ms 102.250op/s 50.645ms 92.438op/s
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.51.0-SNAPSHOT~b2e8d4e670, baseline=1.51.0-SNAPSHOT~aa9dd27535
    dateFormat X
    axisFormat %s
section baseline
no_agent (4.4 ms) : 4351, 4449
.   : milestone, 4400,
iast (9.284 ms) : 9130, 9439
.   : milestone, 9284,
iast_FULL (14.005 ms) : 13731, 14278
.   : milestone, 14005,
iast_GLOBAL (10.351 ms) : 10165, 10537
.   : milestone, 10351,
profiling (8.688 ms) : 8557, 8819
.   : milestone, 8688,
tracing (7.534 ms) : 7422, 7646
.   : milestone, 7534,
section candidate
no_agent (4.605 ms) : 4552, 4657
.   : milestone, 4605,
iast (9.038 ms) : 8892, 9184
.   : milestone, 9038,
iast_FULL (14.416 ms) : 14121, 14710
.   : milestone, 14416,
iast_GLOBAL (10.28 ms) : 10088, 10472
.   : milestone, 10280,
profiling (8.861 ms) : 8724, 8998
.   : milestone, 8861,
tracing (7.875 ms) : 7752, 7997
.   : milestone, 7875,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 4.4 ms [4.351 ms, 4.449 ms] -
iast 9.284 ms [9.13 ms, 9.439 ms] 4.884 ms (111.0%)
iast_FULL 14.005 ms [13.731 ms, 14.278 ms] 9.604 ms (218.3%)
iast_GLOBAL 10.351 ms [10.165 ms, 10.537 ms] 5.951 ms (135.3%)
profiling 8.688 ms [8.557 ms, 8.819 ms] 4.288 ms (97.5%)
tracing 7.534 ms [7.422 ms, 7.646 ms] 3.134 ms (71.2%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 4.605 ms [4.552 ms, 4.657 ms] -
iast 9.038 ms [8.892 ms, 9.184 ms] 4.433 ms (96.3%)
iast_FULL 14.416 ms [14.121 ms, 14.71 ms] 9.811 ms (213.1%)
iast_GLOBAL 10.28 ms [10.088 ms, 10.472 ms] 5.675 ms (123.2%)
profiling 8.861 ms [8.724 ms, 8.998 ms] 4.256 ms (92.4%)
tracing 7.875 ms [7.752 ms, 7.997 ms] 3.27 ms (71.0%)
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.51.0-SNAPSHOT~b2e8d4e670, baseline=1.51.0-SNAPSHOT~aa9dd27535
    dateFormat X
    axisFormat %s
section baseline
no_agent (37.394 ms) : 37094, 37695
.   : milestone, 37394,
appsec (50.645 ms) : 50190, 51101
.   : milestone, 50645,
code_origins (44.803 ms) : 44417, 45190
.   : milestone, 44803,
iast (43.082 ms) : 42714, 43450
.   : milestone, 43082,
profiling (51.051 ms) : 50531, 51570
.   : milestone, 51051,
tracing (44.075 ms) : 43712, 44438
.   : milestone, 44075,
section candidate
no_agent (37.477 ms) : 37170, 37784
.   : milestone, 37477,
appsec (45.738 ms) : 45350, 46127
.   : milestone, 45738,
code_origins (45.296 ms) : 44936, 45656
.   : milestone, 45296,
iast (44.294 ms) : 43908, 44680
.   : milestone, 44294,
profiling (49.371 ms) : 48908, 49834
.   : milestone, 49371,
tracing (45.288 ms) : 44911, 45664
.   : milestone, 45288,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 37.394 ms [37.094 ms, 37.695 ms] -
appsec 50.645 ms [50.19 ms, 51.101 ms] 13.251 ms (35.4%)
code_origins 44.803 ms [44.417 ms, 45.19 ms] 7.409 ms (19.8%)
iast 43.082 ms [42.714 ms, 43.45 ms] 5.688 ms (15.2%)
profiling 51.051 ms [50.531 ms, 51.57 ms] 13.656 ms (36.5%)
tracing 44.075 ms [43.712 ms, 44.438 ms] 6.681 ms (17.9%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 37.477 ms [37.17 ms, 37.784 ms] -
appsec 45.738 ms [45.35 ms, 46.127 ms] 8.261 ms (22.0%)
code_origins 45.296 ms [44.936 ms, 45.656 ms] 7.819 ms (20.9%)
iast 44.294 ms [43.908 ms, 44.68 ms] 6.817 ms (18.2%)
profiling 49.371 ms [48.908 ms, 49.834 ms] 11.894 ms (31.7%)
tracing 45.288 ms [44.911 ms, 45.664 ms] 7.811 ms (20.8%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master smola/gradle-3-toolchain8
git_commit_date 1750453785 1750658366
git_commit_sha aa9dd27 b2e8d4e
release_version 1.51.0-SNAPSHOT~aa9dd27535 1.51.0-SNAPSHOT~b2e8d4e670
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1750660544 1750660544
ci_job_id 992770556 992770556
ci_pipeline_id 68420324 68420324
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-bziamzy-project-304-concurrent-3-koelq33r 6.8.0-1029-aws #31~22.04.1-Ubuntu SMP Thu Apr 24 21:16:18 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-bziamzy-project-304-concurrent-3-koelq33r 6.8.0-1029-aws #31~22.04.1-Ubuntu SMP Thu Apr 24 21:16:18 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Summary

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

Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.51.0-SNAPSHOT~b2e8d4e670, baseline=1.51.0-SNAPSHOT~aa9dd27535
    dateFormat X
    axisFormat %s
section baseline
no_agent (14.838 s) : 14838000, 14838000
.   : milestone, 14838000,
appsec (14.952 s) : 14952000, 14952000
.   : milestone, 14952000,
iast (18.909 s) : 18909000, 18909000
.   : milestone, 18909000,
iast_GLOBAL (17.987 s) : 17987000, 17987000
.   : milestone, 17987000,
profiling (15.303 s) : 15303000, 15303000
.   : milestone, 15303000,
tracing (15.037 s) : 15037000, 15037000
.   : milestone, 15037000,
section candidate
no_agent (15.421 s) : 15421000, 15421000
.   : milestone, 15421000,
appsec (14.786 s) : 14786000, 14786000
.   : milestone, 14786000,
iast (18.741 s) : 18741000, 18741000
.   : milestone, 18741000,
iast_GLOBAL (18.095 s) : 18095000, 18095000
.   : milestone, 18095000,
profiling (15.199 s) : 15199000, 15199000
.   : milestone, 15199000,
tracing (15.157 s) : 15157000, 15157000
.   : milestone, 15157000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.838 s [14.838 s, 14.838 s] -
appsec 14.952 s [14.952 s, 14.952 s] 114.0 ms (0.8%)
iast 18.909 s [18.909 s, 18.909 s] 4.071 s (27.4%)
iast_GLOBAL 17.987 s [17.987 s, 17.987 s] 3.149 s (21.2%)
profiling 15.303 s [15.303 s, 15.303 s] 465.0 ms (3.1%)
tracing 15.037 s [15.037 s, 15.037 s] 199.0 ms (1.3%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.421 s [15.421 s, 15.421 s] -
appsec 14.786 s [14.786 s, 14.786 s] -635.0 ms (-4.1%)
iast 18.741 s [18.741 s, 18.741 s] 3.32 s (21.5%)
iast_GLOBAL 18.095 s [18.095 s, 18.095 s] 2.674 s (17.3%)
profiling 15.199 s [15.199 s, 15.199 s] -222.0 ms (-1.4%)
tracing 15.157 s [15.157 s, 15.157 s] -264.0 ms (-1.7%)
Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.51.0-SNAPSHOT~b2e8d4e670, baseline=1.51.0-SNAPSHOT~aa9dd27535
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.487 ms) : 1476, 1499
.   : milestone, 1487,
appsec (2.434 ms) : 2384, 2484
.   : milestone, 2434,
iast (2.204 ms) : 2142, 2266
.   : milestone, 2204,
iast_GLOBAL (2.242 ms) : 2179, 2304
.   : milestone, 2242,
profiling (2.069 ms) : 2018, 2120
.   : milestone, 2069,
tracing (2.047 ms) : 1998, 2095
.   : milestone, 2047,
section candidate
no_agent (1.479 ms) : 1468, 1491
.   : milestone, 1479,
appsec (2.423 ms) : 2373, 2472
.   : milestone, 2423,
iast (2.212 ms) : 2150, 2274
.   : milestone, 2212,
iast_GLOBAL (2.246 ms) : 2183, 2309
.   : milestone, 2246,
profiling (2.078 ms) : 2027, 2129
.   : milestone, 2078,
tracing (2.038 ms) : 1989, 2086
.   : milestone, 2038,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.487 ms [1.476 ms, 1.499 ms] -
appsec 2.434 ms [2.384 ms, 2.484 ms] 946.168 µs (63.6%)
iast 2.204 ms [2.142 ms, 2.266 ms] 716.797 µs (48.2%)
iast_GLOBAL 2.242 ms [2.179 ms, 2.304 ms] 754.148 µs (50.7%)
profiling 2.069 ms [2.018 ms, 2.12 ms] 581.867 µs (39.1%)
tracing 2.047 ms [1.998 ms, 2.095 ms] 559.032 µs (37.6%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.479 ms [1.468 ms, 1.491 ms] -
appsec 2.423 ms [2.373 ms, 2.472 ms] 943.363 µs (63.8%)
iast 2.212 ms [2.15 ms, 2.274 ms] 732.877 µs (49.5%)
iast_GLOBAL 2.246 ms [2.183 ms, 2.309 ms] 766.804 µs (51.8%)
profiling 2.078 ms [2.027 ms, 2.129 ms] 599.066 µs (40.5%)
tracing 2.038 ms [1.989 ms, 2.086 ms] 558.662 µs (37.8%)

@bric3 bric3 changed the title Use JDK 8 by default Use JDK 8 explicitly as toolchain Jun 23, 2025
@@ -225,6 +225,7 @@ tasks.register('extractLatestMuleServices', Sync) {
// build the mule application via maven
tasks.register('mvnPackage', Exec) {
workingDir "$appDir"
environment.JAVA_HOME = System.getenv("JAVA_8_HOME")
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: Wouldn't be better to derive this env var from the toolchain API ?

Same for the other similar changes.

apply from: "$rootDir/gradle/java.gradle"
apply from: "$rootDir/gradle/tries.gradle"

tasks.compileTestJava.configure {
tasks.withType(JavaCompile).configureEach {
// need access to sun.misc.SharedSecrets
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
// need access to sun.misc.SharedSecrets
// Need access to sun.misc.SharedSecrets, which moved to a restricted jdk module in later JDKs

Comment on lines -41 to -46
def skipSettingCompilerRelease = project.findProperty('skipSettingCompilerRelease')
if (!skipSettingCompilerRelease && JavaVersion.current().isJava9Compatible()) {
compileJava.options.release = project.provider {
JavaVersion.toVersion(targetCompatibility).majorVersion as Integer
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: I'd suggest to keep this behavior via ext.setJavaVersion, dropping the flag skipSettingCompilerRelease and just use the release options if JDK >= 9.

Possible the setJavaVersion, can have a flag or enum that could be used to explicitly use the source and target rather than option, e.g. for the profiling project to access jfr.

fork.executable = javaLauncher.executablePath
}
if (!this.javaVersion) {
this.javaVersion = "8"
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: Maybe extract "8" to some variable indicating the agent version.

Another suggestion: wouldn't be better to set 8 as a default value in MuzzleDirective.javaVersion ?

Comment on lines +722 to -729
workQueue = workerExecutor.processIsolation { spec ->
spec.forkOptions { fork ->
fork.executable = javaLauncher.executablePath
}
} else {
workQueue = workerExecutor.noIsolation()
Copy link
Contributor

Choose a reason for hiding this comment

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

note: After some diving, the ClassLoader.systemClassLoader() in workerExecutor.processIsolation(...) work queue appears to have quite a few jars from the gradle distribution — 165 on minimal reproducer project with gradle 8.14.2 — on the classpath.

Among them httpclient 4.5.13, which may explains why some muzzle tests (like :dd-java-agent:instrumentation:apache-httpclient-4:muzzle-AssertFail-commons-httpclient-commons-httpclient-3.1) are succeeding instead of failing. These are checking that dependencies outside this range [4.0,5) do not match, but during lookup class of the httpclient are seen on the classpath.

image

This does not happen when the work queue executor workerExecutor.noIsolation() was used. It was used when the javaVersion was not explictly set via the coreJdk() muzzle directive. In fact in this mode the ClassLoader.systemCLassLoader() shows only two gradle jars, the gradle launcher and the instrumentation agent.


We may want to improve the situation there, as it renders the tests brittle even if they appear to rightfully pass.

For this PR, which is about decoupling the JDK running gradle from the target JDK (8 at this time), we may possibly run this in the JVM that runs gradle because muzzle is about detecting whether a dependency is still covered by an instrumentation and as such tries to detect types / "outlines".

Copy link
Contributor

Choose a reason for hiding this comment

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

By the way, here's how to debug,

  1. First select only one version that fails, e.g. the directive that is failing is pass with a range assertInverse (this will assess that opposite range will fail), so we need a directive expected to fail for a single version, e.g. here expect 3.1 to fail.

      muzzle {
    -   fail {
    -     group = "commons-httpclient"
    -     module = "commons-httpclient"
    -     versions = "[,4.0)"
    -     skipVersions += '3.1-jenkins-1'
    -     skipVersions += '2.0-final' // broken metadata on maven central
    -   }
    -   pass {
    -     group = "org.apache.httpcomponents"
    -     module = "httpclient"
    -     versions = "[4.0,5)"
    -     assertInverse = true
    -   }
    -   pass {
    -     // We want to support the dropwizard clients too.
    -     group = 'io.dropwizard'
    -     module = 'dropwizard-client'
    -     versions = "[,3)" // dropwizard-client 3+ uses httpclient5
    -   }
    +   fail {
    +     group = "commons-httpclient"
    +     module = "commons-httpclient"
    +     versions = "[3.1,]"
    +   }
      }

    This is necessary because the task :dd-java-agent:instrumentation:apache-httpclient-4:muzzle-AssertFail-commons-httpclient-commons-httpclient-3.1 is created after invoking muzzle, and as such cannot be invoked directly.

  2. Make the worker daemon debuggable since it's another process

      workQueue = workerExecutor.processIsolation { spec ->
        spec.forkOptions { fork ->
          fork.executable = javaLauncher.executablePath
    +       fork.debug = true
        }
      }
  3. Then run/debug the muzzle task :dd-java-agent:instrumentation:apache-httpclient-4:muzzle.

  4. When the daemon work prints it's listening for a debugger, just create a Remote JVM Debug config in Intellij in Attach to remote JVM debugger mode. Other settings are untouched (port in 5005). No need to add the command line arg to the forked process !

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants