dd-trace-java icon indicating copy to clipboard operation
dd-trace-java copied to clipboard

Replace JCTools queues with VarHandle-based implementations for Java 9+

Open amarziali opened this issue 4 months ago • 5 comments

What Does This Do

This PR introduces a set of queue implementations in order to replace the JCTools-based queues, eliminating direct usage of sun.misc.Unsafe and providing full compatibility with Java 9+ runtimes through the VarHandle API.

The goal is to achieve similar high-performance concurrent queue behavior as JCTools while using supported, standard Java mechanisms.

A new Queues factory class is introduced to dynamically select the optimal queue implementation based on the Java runtime environment:

  • On Java 9 and newer, the factory instantiates the new VarHandle-based queues
  • On Java 1.8, it falls back to the existing JCTools-based queues to maintain backward compatibility and performance consistency.

Introduced Classes Summary

Class Pattern Description
SpscArrayQueueVarHandle Single-Producer / Single-Consumer Wait-free queue optimized for single-threaded access on both ends. Uses acquire/release semantics for minimal memory ordering overhead.
SpmcArrayQueueVarHandle Single-Producer / Multiple-Consumer Wait-free producer with lock-free consumers competing via CAS on the head index. Uses cached consumerLimit to reduce contention on producer index reads.
MpscArrayQueueVarHandle<E> Multiple-Producer / Single-Consumer Lock-free producers compete via CAS on the tail index, with a wait-free consumer. Maintains cached producerLimit to minimize expensive head index reads.
MpscBlockingConsumerArrayQueueVarHandle<E> Multiple-Producer / Single-Consumer (Blocking) MPSC queue with efficient blocking support for the consumer. Uses the low bit of the producer index to signal blocked state, enabling producers to wake the consumer via LockSupport.unpark() without locks.

Memory Padding

All queue state fields (head, tail, cached limits, etc.) are cache-line padded to prevent false sharing between producers and consumers.
This ensures that frequently accessed hot fields do not reside on the same cache line across threads, minimizing cache invalidations and improving throughput under contention.

Memory Ordering Semantics

VarHandle access modes are carefully chosen to balance performance and correctness, using the weakest ordering that maintains visibility guarantees:

  • setRelease / getAcquire — Element publication and consumption. Release stores guarantee all preceding writes are visible before the element, while acquire loads ensure all subsequent reads see the published data. Provides efficient producer-consumer synchronization without full memory barriers.
  • getOpaque — Hot-path reads of cached limits and blocked state. Ensures atomic access and eventual visibility without memory fence overhead. Safe when stale reads are benign (e.g., cached producerLimit triggers recalculation on mismatch, or when subsequent CAS provides full synchronization).
  • getVolatile — Synchronization points requiring immediate visibility. Used when refreshing producer/consumer limits or checking queue state where correctness depends on seeing the latest value from other threads. Provides sequential consistency with full memory barriers.
  • Plain access (get / set) — Single-threaded paths where no inter-thread coordination is needed (e.g., single consumer reading its own index).

Queue Benchmark Results

SPSC (Single-Producer / Single-Consumer)

Capacity = 1024
Operation JCTools (ops/us ± err) VarHandle (ops/us ± err)
Total 285,696 ± 397,530 180,354 ± 315,780
Produce 141,966 ± 205,795 89,810 ± 160,517
Consume 143,730 ± 191,736 90,544 ± 155,265
Capacity = 65536
Operation JCTools (ops/us ± err) VarHandle (ops/us ± err)
Total 546,439 ± 304,146 449,770 ± 4,365
Produce 273,143 ± 152,509 224,833 ± 2,992
Consume 273,296 ± 151,645 224,937 ± 1,432

MPSC (Multi-Producer / Single-Consumer)

Capacity = 1024
Operation JCTools (ops/us ± err) VarHandle (ops/us ± err)
Total 26,429 ± 24,149 19,453 ± 31,615
Produce 8,919 ± 3,046 8,055 ± 12,486
Consume 17,510 ± 23,328 11,398 ± 40,952
Capacity = 65536
Operation JCTools (ops/us ± err) VarHandle (ops/us ± err)
Total 24,071 ± 71,594 22,795 ± 55,130
Produce 7,361 ± 18,533 7,604 ± 4,840
Consume 16,710 ± 88,477 15,191 ± 59,717

MPSC (Blocking Consumer)

Capacity = 1024
Operation JCTools (ops/us ± err) VarHandle (ops/us ± err)
Total 31,150 ± 211,089 18,202 ± 11,319
Produce 7,244 ± 9,645 8,066 ± 14,697
Consume 23,906 ± 215,572 10,136 ± 5,535
Capacity = 65536
Operation JCTools (ops/us ± err) VarHandle (ops/us ± err)
Total 27,277 ± 69,378 19,187 ± 40,915
Produce 6,224 ± 11,748 7,300 ± 9,286
Consume 21,053 ± 64,255 11,887 ± 39,520

Takeaways:

  • MPSC queues can be replaced with a VarHandle equivalent. In some cases, the new implementation shows even better performances.
  • jctools still outperforms generally speaking. However the measurements show a high error variance. Better tests can be done by increasing the iterations and/or the forks

Motivation

Additional Notes

Contributor Checklist

Jira ticket: [PROJ-IDENT]

amarziali avatar Nov 03 '25 16:11 amarziali

🎯 Code Coverage
Patch Coverage: 91.30%
Total Coverage: 59.64% (-0.02%)
View detailed report

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

Debugger benchmarks

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
ci_job_date 1762350659 1762351004
end_time 2025-11-05T13:52:20 2025-11-05T13:58:05
git_branch master andrea.marziali/remove-jctools-queues
git_commit_sha 8db72c0988 a880c670b93ab1e21731bcc5d0cd4db09c81b85d
start_time 2025-11-05T13:51:00 2025-11-05T13:56:45
See matching parameters
Baseline Candidate
ci_job_id 1217030429 1217030429
ci_pipeline_id 81317491 81317491
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
git_commit_date 1762349967 1762349967

Summary

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

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
[-16.952µs; +19.877µs] or [-6.074%; +7.122%]
unstable
[-27.156µs; +31.309µs] or [-8.553%; +9.861%]
unstable
[-36.996µs; +42.158µs] or [-11.187%; +12.748%]
unstable
[-142.099µs; +61.104µs] or [-13.747%; +5.911%]
same
scenario:basic same same same unstable
[-226.500µs; -8.890µs] or [-25.732%; -1.010%]
same
scenario:loop unsure
[+0.257µs; +4.484µs] or [+0.003%; +0.051%]
unsure
[-7.436µs; -0.629µs] or [-0.083%; -0.007%]
unsure
[-8.505µs; -0.543µs] or [-0.094%; -0.006%]
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 (317.508 µs) : 291, 344
.   : milestone, 318,
basic (294.053 µs) : 287, 301
.   : milestone, 294,
loop (8.959 ms) : 8956, 8963
.   : milestone, 8959,
section candidate
noprobe (319.585 µs) : 290, 349
.   : milestone, 320,
basic (293.196 µs) : 286, 300
.   : milestone, 293,
loop (8.955 ms) : 8952, 8958
.   : milestone, 8955,
  • baseline results
Scenario Request median duration [CI 0.99]
noprobe 317.508 µs [291.339 µs, 343.677 µs]
basic 294.053 µs [286.681 µs, 301.425 µs]
loop 8.959 ms [8.956 ms, 8.963 ms]
  • candidate results
Scenario Request median duration [CI 0.99]
noprobe 319.585 µs [290.19 µs, 348.98 µs]
basic 293.196 µs [286.34 µs, 300.053 µs]
loop 8.955 ms [8.952 ms, 8.958 ms]

pr-commenter[bot] avatar Nov 03 '25 17:11 pr-commenter[bot]

Benchmarks

⚠️ Warning: Baseline build not found for merge-base commit. Comparing against the latest commit on master instead.

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master andrea.marziali/remove-jctools-queues
git_commit_date 1766069283 1766071033
git_commit_sha 39b2cbd3e1 17fccd95ab
release_version 1.58.0-SNAPSHOT~39b2cbd3e1 1.57.0-SNAPSHOT~17fccd95ab
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1766072887 1766072887
ci_job_id 1306488793 1306488793
ci_pipeline_id 87574484 87574484
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-np5fcr4w 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-np5fcr4w 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 1 performance regressions! Performance is the same for 55 metrics, 9 unstable metrics.

scenario Δ mean execution_time candidate mean execution_time baseline mean execution_time
scenario:startup:petclinic:appsec:Telemetry worse
[+1.149ms; +1.544ms] or [+12.915%; +17.345%]
10.246ms 8.900ms
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.57.0-SNAPSHOT~17fccd95ab, baseline=1.58.0-SNAPSHOT~39b2cbd3e1

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.082 s) : 0, 1082291
Total [baseline] (10.83 s) : 0, 10829644
Agent [candidate] (1.083 s) : 0, 1083177
Total [candidate] (10.809 s) : 0, 10809098
section appsec
Agent [baseline] (1.266 s) : 0, 1265763
Total [baseline] (10.997 s) : 0, 10996579
Agent [candidate] (1.261 s) : 0, 1261160
Total [candidate] (10.97 s) : 0, 10969746
section iast
Agent [baseline] (1.222 s) : 0, 1221955
Total [baseline] (11.175 s) : 0, 11175058
Agent [candidate] (1.217 s) : 0, 1216507
Total [candidate] (11.233 s) : 0, 11232515
section profiling
Agent [baseline] (1.204 s) : 0, 1204457
Total [baseline] (10.955 s) : 0, 10955162
Agent [candidate] (1.216 s) : 0, 1216068
Total [candidate] (10.967 s) : 0, 10966960
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.082 s -
Agent appsec 1.266 s 183.472 ms (17.0%)
Agent iast 1.222 s 139.664 ms (12.9%)
Agent profiling 1.204 s 122.166 ms (11.3%)
Total tracing 10.83 s -
Total appsec 10.997 s 166.936 ms (1.5%)
Total iast 11.175 s 345.414 ms (3.2%)
Total profiling 10.955 s 125.518 ms (1.2%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.083 s -
Agent appsec 1.261 s 177.982 ms (16.4%)
Agent iast 1.217 s 133.329 ms (12.3%)
Agent profiling 1.216 s 132.891 ms (12.3%)
Total tracing 10.809 s -
Total appsec 10.97 s 160.648 ms (1.5%)
Total iast 11.233 s 423.418 ms (3.9%)
Total profiling 10.967 s 157.863 ms (1.5%)
gantt
    title petclinic - break down per module: candidate=1.57.0-SNAPSHOT~17fccd95ab, baseline=1.58.0-SNAPSHOT~39b2cbd3e1

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.185 ms) : 0, 1185
crashtracking [candidate] (1.192 ms) : 0, 1192
BytebuddyAgent [baseline] (648.736 ms) : 0, 648736
BytebuddyAgent [candidate] (652.666 ms) : 0, 652666
GlobalTracer [baseline] (282.848 ms) : 0, 282848
GlobalTracer [candidate] (279.035 ms) : 0, 279035
AppSec [baseline] (32.375 ms) : 0, 32375
AppSec [candidate] (32.462 ms) : 0, 32462
Debugger [baseline] (68.269 ms) : 0, 68269
Debugger [candidate] (68.29 ms) : 0, 68290
Remote Config [baseline] (617.343 µs) : 0, 617
Remote Config [candidate] (596.663 µs) : 0, 597
Telemetry [baseline] (9.03 ms) : 0, 9030
Telemetry [candidate] (9.722 ms) : 0, 9722
Flare Poller [baseline] (3.673 ms) : 0, 3673
Flare Poller [candidate] (3.696 ms) : 0, 3696
section appsec
crashtracking [baseline] (1.196 ms) : 0, 1196
crashtracking [candidate] (1.205 ms) : 0, 1205
BytebuddyAgent [baseline] (689.853 ms) : 0, 689853
BytebuddyAgent [candidate] (689.172 ms) : 0, 689172
GlobalTracer [baseline] (259.043 ms) : 0, 259043
GlobalTracer [candidate] (254.47 ms) : 0, 254470
AppSec [baseline] (175.725 ms) : 0, 175725
AppSec [candidate] (173.852 ms) : 0, 173852
Debugger [baseline] (66.16 ms) : 0, 66160
Debugger [candidate] (67.633 ms) : 0, 67633
Remote Config [baseline] (912.911 µs) : 0, 913
Remote Config [candidate] (704.532 µs) : 0, 705
Telemetry [baseline] (8.9 ms) : 0, 8900
Telemetry [candidate] (10.246 ms) : 0, 10246
Flare Poller [baseline] (3.772 ms) : 0, 3772
Flare Poller [candidate] (3.95 ms) : 0, 3950
IAST [baseline] (24.608 ms) : 0, 24608
IAST [candidate] (24.397 ms) : 0, 24397
section iast
crashtracking [baseline] (1.21 ms) : 0, 1210
crashtracking [candidate] (1.18 ms) : 0, 1180
BytebuddyAgent [baseline] (789.819 ms) : 0, 789819
BytebuddyAgent [candidate] (788.172 ms) : 0, 788172
GlobalTracer [baseline] (255.471 ms) : 0, 255471
GlobalTracer [candidate] (251.511 ms) : 0, 251511
AppSec [baseline] (31.8 ms) : 0, 31800
AppSec [candidate] (35.892 ms) : 0, 35892
Debugger [baseline] (68.548 ms) : 0, 68548
Debugger [candidate] (64.859 ms) : 0, 64859
Remote Config [baseline] (578.722 µs) : 0, 579
Remote Config [candidate] (628.126 µs) : 0, 628
Telemetry [baseline] (8.496 ms) : 0, 8496
Telemetry [candidate] (8.447 ms) : 0, 8447
Flare Poller [baseline] (3.515 ms) : 0, 3515
Flare Poller [candidate] (3.473 ms) : 0, 3473
IAST [baseline] (27.03 ms) : 0, 27030
IAST [candidate] (26.992 ms) : 0, 26992
section profiling
ProfilingAgent [baseline] (97.377 ms) : 0, 97377
ProfilingAgent [candidate] (99.316 ms) : 0, 99316
crashtracking [baseline] (1.215 ms) : 0, 1215
crashtracking [candidate] (1.226 ms) : 0, 1226
BytebuddyAgent [baseline] (702.011 ms) : 0, 702011
BytebuddyAgent [candidate] (710.24 ms) : 0, 710240
GlobalTracer [baseline] (220.666 ms) : 0, 220666
GlobalTracer [candidate] (219.118 ms) : 0, 219118
AppSec [baseline] (31.995 ms) : 0, 31995
AppSec [candidate] (32.928 ms) : 0, 32928
Debugger [baseline] (68.336 ms) : 0, 68336
Debugger [candidate] (69.696 ms) : 0, 69696
Remote Config [baseline] (622.6 µs) : 0, 623
Remote Config [candidate] (628.039 µs) : 0, 628
Telemetry [baseline] (8.785 ms) : 0, 8785
Telemetry [candidate] (8.821 ms) : 0, 8821
Flare Poller [baseline] (3.694 ms) : 0, 3694
Flare Poller [candidate] (3.693 ms) : 0, 3693
Profiling [baseline] (97.954 ms) : 0, 97954
Profiling [candidate] (99.908 ms) : 0, 99908
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.57.0-SNAPSHOT~17fccd95ab, baseline=1.58.0-SNAPSHOT~39b2cbd3e1

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.085 s) : 0, 1085398
Total [baseline] (8.758 s) : 0, 8757666
Agent [candidate] (1.081 s) : 0, 1081434
Total [candidate] (8.71 s) : 0, 8709935
section iast
Agent [baseline] (1.223 s) : 0, 1222754
Total [baseline] (9.386 s) : 0, 9386204
Agent [candidate] (1.225 s) : 0, 1225496
Total [candidate] (9.405 s) : 0, 9404671
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.085 s -
Agent iast 1.223 s 137.356 ms (12.7%)
Total tracing 8.758 s -
Total iast 9.386 s 628.538 ms (7.2%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.081 s -
Agent iast 1.225 s 144.062 ms (13.3%)
Total tracing 8.71 s -
Total iast 9.405 s 694.736 ms (8.0%)
gantt
    title insecure-bank - break down per module: candidate=1.57.0-SNAPSHOT~17fccd95ab, baseline=1.58.0-SNAPSHOT~39b2cbd3e1

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.203 ms) : 0, 1203
crashtracking [candidate] (1.207 ms) : 0, 1207
BytebuddyAgent [baseline] (652.575 ms) : 0, 652575
BytebuddyAgent [candidate] (649.915 ms) : 0, 649915
GlobalTracer [baseline] (282.667 ms) : 0, 282667
GlobalTracer [candidate] (279.558 ms) : 0, 279558
AppSec [baseline] (32.369 ms) : 0, 32369
AppSec [candidate] (32.49 ms) : 0, 32490
Debugger [baseline] (67.259 ms) : 0, 67259
Debugger [candidate] (68.543 ms) : 0, 68543
Remote Config [baseline] (635.828 µs) : 0, 636
Remote Config [candidate] (609.388 µs) : 0, 609
Telemetry [baseline] (9.282 ms) : 0, 9282
Telemetry [candidate] (8.984 ms) : 0, 8984
Flare Poller [baseline] (3.764 ms) : 0, 3764
Flare Poller [candidate] (4.604 ms) : 0, 4604
section iast
crashtracking [baseline] (1.194 ms) : 0, 1194
crashtracking [candidate] (1.196 ms) : 0, 1196
BytebuddyAgent [baseline] (790.519 ms) : 0, 790519
BytebuddyAgent [candidate] (795.775 ms) : 0, 795775
GlobalTracer [baseline] (256.167 ms) : 0, 256167
GlobalTracer [candidate] (253.221 ms) : 0, 253221
AppSec [baseline] (31.977 ms) : 0, 31977
AppSec [candidate] (33.942 ms) : 0, 33942
Debugger [baseline] (67.749 ms) : 0, 67749
Debugger [candidate] (65.438 ms) : 0, 65438
Remote Config [baseline] (599.339 µs) : 0, 599
Remote Config [candidate] (617.923 µs) : 0, 618
Telemetry [baseline] (8.533 ms) : 0, 8533
Telemetry [candidate] (8.467 ms) : 0, 8467
Flare Poller [baseline] (3.513 ms) : 0, 3513
Flare Poller [candidate] (3.47 ms) : 0, 3470
IAST [baseline] (27.01 ms) : 0, 27010
IAST [candidate] (27.856 ms) : 0, 27856

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master andrea.marziali/remove-jctools-queues
git_commit_date 1766069283 1766071033
git_commit_sha 39b2cbd3e1 17fccd95ab
release_version 1.58.0-SNAPSHOT~39b2cbd3e1 1.57.0-SNAPSHOT~17fccd95ab
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1766073291 1766073291
ci_job_id 1306488794 1306488794
ci_pipeline_id 87574484 87574484
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-j8ss1euk 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-j8ss1euk 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 18 metrics, 15 unstable metrics.

scenario Δ mean agg_http_req_duration_p50 Δ mean agg_http_req_duration_p95 Δ mean throughput candidate mean agg_http_req_duration_p50 candidate mean agg_http_req_duration_p95 candidate mean throughput baseline mean agg_http_req_duration_p50 baseline mean agg_http_req_duration_p95 baseline mean throughput
scenario:load:insecure-bank:iast:high_load better
[-127.345µs; -56.070µs] or [-5.146%; -2.266%]
unsure
[-428.556µs; -95.902µs] or [-5.890%; -1.318%]
unstable
[-78.398op/s; +184.898op/s] or [-5.445%; +12.843%]
2.383ms 7.014ms 1492.969op/s 2.475ms 7.276ms 1439.719op/s
scenario:load:petclinic:iast:high_load worse
[+0.765ms; +1.746ms] or [+4.423%; +10.089%]
worse
[+0.718ms; +2.188ms] or [+2.508%; +7.646%]
unstable
[-42.756op/s; +7.944op/s] or [-16.159%; +3.002%]
18.557ms 30.071ms 247.188op/s 17.302ms 28.618ms 264.594op/s
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.57.0-SNAPSHOT~17fccd95ab, baseline=1.58.0-SNAPSHOT~39b2cbd3e1
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.201 ms) : 1190, 1213
.   : milestone, 1201,
iast (3.177 ms) : 3138, 3216
.   : milestone, 3177,
iast_FULL (5.9 ms) : 5841, 5959
.   : milestone, 5900,
iast_GLOBAL (3.513 ms) : 3468, 3557
.   : milestone, 3513,
profiling (1.965 ms) : 1948, 1982
.   : milestone, 1965,
tracing (1.76 ms) : 1746, 1775
.   : milestone, 1760,
section candidate
no_agent (1.195 ms) : 1183, 1207
.   : milestone, 1195,
iast (3.061 ms) : 3025, 3098
.   : milestone, 3061,
iast_FULL (5.761 ms) : 5703, 5819
.   : milestone, 5761,
iast_GLOBAL (3.583 ms) : 3531, 3634
.   : milestone, 3583,
profiling (1.92 ms) : 1903, 1936
.   : milestone, 1920,
tracing (1.767 ms) : 1754, 1781
.   : milestone, 1767,
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.201 ms [1.19 ms, 1.213 ms] -
iast 3.177 ms [3.138 ms, 3.216 ms] 1.975 ms (164.4%)
iast_FULL 5.9 ms [5.841 ms, 5.959 ms] 4.699 ms (391.1%)
iast_GLOBAL 3.513 ms [3.468 ms, 3.557 ms] 2.311 ms (192.4%)
profiling 1.965 ms [1.948 ms, 1.982 ms] 763.31 µs (63.5%)
tracing 1.76 ms [1.746 ms, 1.775 ms] 559.042 µs (46.5%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.195 ms [1.183 ms, 1.207 ms] -
iast 3.061 ms [3.025 ms, 3.098 ms] 1.866 ms (156.1%)
iast_FULL 5.761 ms [5.703 ms, 5.819 ms] 4.566 ms (382.1%)
iast_GLOBAL 3.583 ms [3.531 ms, 3.634 ms] 2.388 ms (199.8%)
profiling 1.92 ms [1.903 ms, 1.936 ms] 724.479 µs (60.6%)
tracing 1.767 ms [1.754 ms, 1.781 ms] 572.177 µs (47.9%)
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.57.0-SNAPSHOT~17fccd95ab, baseline=1.58.0-SNAPSHOT~39b2cbd3e1
    dateFormat X
    axisFormat %s
section baseline
no_agent (19.121 ms) : 18922, 19320
.   : milestone, 19121,
appsec (18.699 ms) : 18509, 18890
.   : milestone, 18699,
code_origins (17.992 ms) : 17811, 18173
.   : milestone, 17992,
iast (17.63 ms) : 17456, 17804
.   : milestone, 17630,
profiling (19.269 ms) : 19076, 19462
.   : milestone, 19269,
tracing (17.771 ms) : 17591, 17950
.   : milestone, 17771,
section candidate
no_agent (18.763 ms) : 18576, 18949
.   : milestone, 18763,
appsec (18.651 ms) : 18463, 18840
.   : milestone, 18651,
code_origins (17.886 ms) : 17706, 18067
.   : milestone, 17886,
iast (18.884 ms) : 18693, 19074
.   : milestone, 18884,
profiling (19.901 ms) : 19698, 20103
.   : milestone, 19901,
tracing (17.799 ms) : 17621, 17977
.   : milestone, 17799,
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 19.121 ms [18.922 ms, 19.32 ms] -
appsec 18.699 ms [18.509 ms, 18.89 ms] -421.342 µs (-2.2%)
code_origins 17.992 ms [17.811 ms, 18.173 ms] -1.129 ms (-5.9%)
iast 17.63 ms [17.456 ms, 17.804 ms] -1.491 ms (-7.8%)
profiling 19.269 ms [19.076 ms, 19.462 ms] 148.072 µs (0.8%)
tracing 17.771 ms [17.591 ms, 17.95 ms] -1.35 ms (-7.1%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 18.763 ms [18.576 ms, 18.949 ms] -
appsec 18.651 ms [18.463 ms, 18.84 ms] -111.119 µs (-0.6%)
code_origins 17.886 ms [17.706 ms, 18.067 ms] -876.23 µs (-4.7%)
iast 18.884 ms [18.693 ms, 19.074 ms] 121.0 µs (0.6%)
profiling 19.901 ms [19.698 ms, 20.103 ms] 1.138 ms (6.1%)
tracing 17.799 ms [17.621 ms, 17.977 ms] -963.524 µs (-5.1%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master andrea.marziali/remove-jctools-queues
git_commit_date 1766069283 1766071033
git_commit_sha 39b2cbd3e1 17fccd95ab
release_version 1.58.0-SNAPSHOT~39b2cbd3e1 1.57.0-SNAPSHOT~17fccd95ab
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1766073096 1766073096
ci_job_id 1306488796 1306488796
ci_pipeline_id 87574484 87574484
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-zc5bacpp 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-zc5bacpp 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 tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.57.0-SNAPSHOT~17fccd95ab, baseline=1.58.0-SNAPSHOT~39b2cbd3e1
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.476 ms) : 1464, 1487
.   : milestone, 1476,
appsec (3.73 ms) : 3511, 3948
.   : milestone, 3730,
iast (2.217 ms) : 2152, 2281
.   : milestone, 2217,
iast_GLOBAL (2.26 ms) : 2195, 2325
.   : milestone, 2260,
profiling (2.06 ms) : 2008, 2112
.   : milestone, 2060,
tracing (2.049 ms) : 1998, 2100
.   : milestone, 2049,
section candidate
no_agent (1.475 ms) : 1464, 1487
.   : milestone, 1475,
appsec (3.734 ms) : 3516, 3953
.   : milestone, 3734,
iast (2.221 ms) : 2156, 2286
.   : milestone, 2221,
iast_GLOBAL (2.263 ms) : 2198, 2328
.   : milestone, 2263,
profiling (2.073 ms) : 2021, 2126
.   : milestone, 2073,
tracing (2.041 ms) : 1990, 2091
.   : milestone, 2041,
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.476 ms [1.464 ms, 1.487 ms] -
appsec 3.73 ms [3.511 ms, 3.948 ms] 2.254 ms (152.8%)
iast 2.217 ms [2.152 ms, 2.281 ms] 741.095 µs (50.2%)
iast_GLOBAL 2.26 ms [2.195 ms, 2.325 ms] 784.438 µs (53.2%)
profiling 2.06 ms [2.008 ms, 2.112 ms] 584.363 µs (39.6%)
tracing 2.049 ms [1.998 ms, 2.1 ms] 573.182 µs (38.8%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.475 ms [1.464 ms, 1.487 ms] -
appsec 3.734 ms [3.516 ms, 3.953 ms] 2.259 ms (153.1%)
iast 2.221 ms [2.156 ms, 2.286 ms] 745.396 µs (50.5%)
iast_GLOBAL 2.263 ms [2.198 ms, 2.328 ms] 787.173 µs (53.3%)
profiling 2.073 ms [2.021 ms, 2.126 ms] 597.718 µs (40.5%)
tracing 2.041 ms [1.99 ms, 2.091 ms] 565.228 µs (38.3%)
Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.57.0-SNAPSHOT~17fccd95ab, baseline=1.58.0-SNAPSHOT~39b2cbd3e1
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.021 s) : 15021000, 15021000
.   : milestone, 15021000,
appsec (14.45 s) : 14450000, 14450000
.   : milestone, 14450000,
iast (18.368 s) : 18368000, 18368000
.   : milestone, 18368000,
iast_GLOBAL (17.904 s) : 17904000, 17904000
.   : milestone, 17904000,
profiling (14.658 s) : 14658000, 14658000
.   : milestone, 14658000,
tracing (14.598 s) : 14598000, 14598000
.   : milestone, 14598000,
section candidate
no_agent (14.974 s) : 14974000, 14974000
.   : milestone, 14974000,
appsec (14.745 s) : 14745000, 14745000
.   : milestone, 14745000,
iast (17.901 s) : 17901000, 17901000
.   : milestone, 17901000,
iast_GLOBAL (17.92 s) : 17920000, 17920000
.   : milestone, 17920000,
profiling (14.584 s) : 14584000, 14584000
.   : milestone, 14584000,
tracing (14.795 s) : 14795000, 14795000
.   : milestone, 14795000,
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.021 s [15.021 s, 15.021 s] -
appsec 14.45 s [14.45 s, 14.45 s] -571.0 ms (-3.8%)
iast 18.368 s [18.368 s, 18.368 s] 3.347 s (22.3%)
iast_GLOBAL 17.904 s [17.904 s, 17.904 s] 2.883 s (19.2%)
profiling 14.658 s [14.658 s, 14.658 s] -363.0 ms (-2.4%)
tracing 14.598 s [14.598 s, 14.598 s] -423.0 ms (-2.8%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.974 s [14.974 s, 14.974 s] -
appsec 14.745 s [14.745 s, 14.745 s] -229.0 ms (-1.5%)
iast 17.901 s [17.901 s, 17.901 s] 2.927 s (19.5%)
iast_GLOBAL 17.92 s [17.92 s, 17.92 s] 2.946 s (19.7%)
profiling 14.584 s [14.584 s, 14.584 s] -390.0 ms (-2.6%)
tracing 14.795 s [14.795 s, 14.795 s] -179.0 ms (-1.2%)

pr-commenter[bot] avatar Nov 03 '25 17:11 pr-commenter[bot]

Hi! 👋 Thanks for your pull request! 🎉

To help us review it, please make sure to:

  • Add at least one type, and one component or instrumentation label to the pull request

If you need help, please check our contributing guidelines.

github-actions[bot] avatar Nov 10 '25 16:11 github-actions[bot]

Hi @amarziali I am one of the developers of JCTools and we are super happy if we could bring a var handle generation variant in our lib as well. I can see the value and faster feedback/different ownership of having a stripped version of our dependency (which can still be obtain via shading actually...), but I believe would be a great community value if we could join efforts...plus, we love contributions ☺️

Note: JCTools is at the very core of other frameworks which will soon hit the "no unsafe world" JVM barrier, including Netty. I'm recently working hard to improve it re this aspect, and JCtools is one of the key but missing pieces there too. Which means that contributing to JCTools would bring an enormous value to Netty and to many others very impactful projects as well 🙏

franz1981 avatar Nov 13 '25 08:11 franz1981