-
Notifications
You must be signed in to change notification settings - Fork 322
Force early classloading for PublishState #10273
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
base: master
Are you sure you want to change the base?
Conversation
bric3
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nitpick around the comment.
| // preload this enum to avoid triggering classloading on the hot path | ||
| TraceCollector.PublishState.values(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion:
| // preload this enum to avoid triggering classloading on the hot path | |
| TraceCollector.PublishState.values(); | |
| // preload this enum to avoid triggering classloading on the hot path | |
| // This prevent an an issue with VirtualThread instrumentation | |
| TraceCollector.PublishState.values(); |
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 57 metrics, 8 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.58.0-SNAPSHOT~9e35dbf68f, baseline=1.58.0-SNAPSHOT~a1ce9aec9d
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.084 s) : 0, 1083919
Total [baseline] (10.782 s) : 0, 10781739
Agent [candidate] (1.087 s) : 0, 1086820
Total [candidate] (10.817 s) : 0, 10816819
section appsec
Agent [baseline] (1.267 s) : 0, 1267331
Total [baseline] (10.9 s) : 0, 10900095
Agent [candidate] (1.28 s) : 0, 1280017
Total [candidate] (11.057 s) : 0, 11056643
section iast
Agent [baseline] (1.225 s) : 0, 1225370
Total [baseline] (11.154 s) : 0, 11154344
Agent [candidate] (1.24 s) : 0, 1239896
Total [candidate] (11.134 s) : 0, 11134392
section profiling
Agent [baseline] (1.216 s) : 0, 1215612
Total [baseline] (11.034 s) : 0, 11034288
Agent [candidate] (1.205 s) : 0, 1205082
Total [candidate] (10.886 s) : 0, 10885906
gantt
title petclinic - break down per module: candidate=1.58.0-SNAPSHOT~9e35dbf68f, baseline=1.58.0-SNAPSHOT~a1ce9aec9d
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.189 ms) : 0, 1189
crashtracking [candidate] (1.178 ms) : 0, 1178
BytebuddyAgent [baseline] (651.517 ms) : 0, 651517
BytebuddyAgent [candidate] (652.305 ms) : 0, 652305
GlobalTracer [baseline] (281.63 ms) : 0, 281630
GlobalTracer [candidate] (283.072 ms) : 0, 283072
AppSec [baseline] (32.632 ms) : 0, 32632
AppSec [candidate] (32.783 ms) : 0, 32783
Debugger [baseline] (67.916 ms) : 0, 67916
Debugger [candidate] (68.71 ms) : 0, 68710
Remote Config [baseline] (610.098 µs) : 0, 610
Remote Config [candidate] (616.565 µs) : 0, 617
Telemetry [baseline] (9.083 ms) : 0, 9083
Telemetry [candidate] (8.987 ms) : 0, 8987
Flare Poller [baseline] (3.792 ms) : 0, 3792
Flare Poller [candidate] (3.75 ms) : 0, 3750
section appsec
crashtracking [baseline] (1.184 ms) : 0, 1184
crashtracking [candidate] (1.187 ms) : 0, 1187
BytebuddyAgent [baseline] (692.454 ms) : 0, 692454
BytebuddyAgent [candidate] (700.122 ms) : 0, 700122
GlobalTracer [baseline] (258.145 ms) : 0, 258145
GlobalTracer [candidate] (261.437 ms) : 0, 261437
IAST [baseline] (24.854 ms) : 0, 24854
IAST [candidate] (25.086 ms) : 0, 25086
AppSec [baseline] (174.15 ms) : 0, 174150
AppSec [candidate] (174.767 ms) : 0, 174767
Debugger [baseline] (67.272 ms) : 0, 67272
Debugger [candidate] (67.848 ms) : 0, 67848
Remote Config [baseline] (742.473 µs) : 0, 742
Remote Config [candidate] (758.575 µs) : 0, 759
Telemetry [baseline] (9.389 ms) : 0, 9389
Telemetry [candidate] (9.606 ms) : 0, 9606
Flare Poller [baseline] (3.719 ms) : 0, 3719
Flare Poller [candidate] (3.755 ms) : 0, 3755
section iast
crashtracking [baseline] (1.183 ms) : 0, 1183
crashtracking [candidate] (1.197 ms) : 0, 1197
BytebuddyAgent [baseline] (793.601 ms) : 0, 793601
BytebuddyAgent [candidate] (803.899 ms) : 0, 803899
GlobalTracer [baseline] (255.7 ms) : 0, 255700
GlobalTracer [candidate] (257.872 ms) : 0, 257872
IAST [baseline] (27.016 ms) : 0, 27016
IAST [candidate] (27.401 ms) : 0, 27401
AppSec [baseline] (33.519 ms) : 0, 33519
AppSec [candidate] (32.928 ms) : 0, 32928
Debugger [baseline] (66.194 ms) : 0, 66194
Debugger [candidate] (68.365 ms) : 0, 68365
Remote Config [baseline] (603.668 µs) : 0, 604
Remote Config [candidate] (605.979 µs) : 0, 606
Telemetry [baseline] (8.554 ms) : 0, 8554
Telemetry [candidate] (8.473 ms) : 0, 8473
Flare Poller [baseline] (3.518 ms) : 0, 3518
Flare Poller [candidate] (3.57 ms) : 0, 3570
section profiling
crashtracking [baseline] (1.23 ms) : 0, 1230
crashtracking [candidate] (1.209 ms) : 0, 1209
BytebuddyAgent [baseline] (709.365 ms) : 0, 709365
BytebuddyAgent [candidate] (703.663 ms) : 0, 703663
GlobalTracer [baseline] (222.109 ms) : 0, 222109
GlobalTracer [candidate] (220.788 ms) : 0, 220788
AppSec [baseline] (32.565 ms) : 0, 32565
AppSec [candidate] (32.097 ms) : 0, 32097
Debugger [baseline] (68.539 ms) : 0, 68539
Debugger [candidate] (68.233 ms) : 0, 68233
Remote Config [baseline] (650.814 µs) : 0, 651
Remote Config [candidate] (673.118 µs) : 0, 673
Telemetry [baseline] (8.799 ms) : 0, 8799
Telemetry [candidate] (8.734 ms) : 0, 8734
Flare Poller [baseline] (3.708 ms) : 0, 3708
Flare Poller [candidate] (3.685 ms) : 0, 3685
ProfilingAgent [baseline] (98.466 ms) : 0, 98466
ProfilingAgent [candidate] (96.295 ms) : 0, 96295
Profiling [baseline] (99.062 ms) : 0, 99062
Profiling [candidate] (96.866 ms) : 0, 96866
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.58.0-SNAPSHOT~9e35dbf68f, baseline=1.58.0-SNAPSHOT~a1ce9aec9d
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.082 s) : 0, 1081596
Total [baseline] (8.776 s) : 0, 8776484
Agent [candidate] (1.088 s) : 0, 1088075
Total [candidate] (8.77 s) : 0, 8770006
section iast
Agent [baseline] (1.232 s) : 0, 1232446
Total [baseline] (9.354 s) : 0, 9353775
Agent [candidate] (1.225 s) : 0, 1225187
Total [candidate] (9.337 s) : 0, 9337002
gantt
title insecure-bank - break down per module: candidate=1.58.0-SNAPSHOT~9e35dbf68f, baseline=1.58.0-SNAPSHOT~a1ce9aec9d
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.187 ms) : 0, 1187
crashtracking [candidate] (1.186 ms) : 0, 1186
BytebuddyAgent [baseline] (650.523 ms) : 0, 650523
BytebuddyAgent [candidate] (654.149 ms) : 0, 654149
GlobalTracer [baseline] (281.607 ms) : 0, 281607
GlobalTracer [candidate] (283.471 ms) : 0, 283471
AppSec [baseline] (32.456 ms) : 0, 32456
AppSec [candidate] (32.825 ms) : 0, 32825
Debugger [baseline] (67.034 ms) : 0, 67034
Debugger [candidate] (67.324 ms) : 0, 67324
Remote Config [baseline] (624.965 µs) : 0, 625
Remote Config [candidate] (624.786 µs) : 0, 625
Telemetry [baseline] (8.979 ms) : 0, 8979
Telemetry [candidate] (9.092 ms) : 0, 9092
Flare Poller [baseline] (3.714 ms) : 0, 3714
Flare Poller [candidate] (3.788 ms) : 0, 3788
section iast
crashtracking [baseline] (1.199 ms) : 0, 1199
crashtracking [candidate] (1.184 ms) : 0, 1184
BytebuddyAgent [baseline] (797.912 ms) : 0, 797912
BytebuddyAgent [candidate] (793.156 ms) : 0, 793156
GlobalTracer [baseline] (256.88 ms) : 0, 256880
GlobalTracer [candidate] (255.759 ms) : 0, 255759
IAST [baseline] (27.41 ms) : 0, 27410
IAST [candidate] (27.062 ms) : 0, 27062
AppSec [baseline] (34.742 ms) : 0, 34742
AppSec [candidate] (34.487 ms) : 0, 34487
Debugger [baseline] (65.88 ms) : 0, 65880
Debugger [candidate] (65.286 ms) : 0, 65286
Remote Config [baseline] (599.98 µs) : 0, 600
Remote Config [candidate] (627.307 µs) : 0, 627
Telemetry [baseline] (8.573 ms) : 0, 8573
Telemetry [candidate] (8.654 ms) : 0, 8654
Flare Poller [baseline] (3.582 ms) : 0, 3582
Flare Poller [candidate] (3.6 ms) : 0, 3600
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 1 performance regressions! Performance is the same for 18 metrics, 17 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.58.0-SNAPSHOT~9e35dbf68f, baseline=1.58.0-SNAPSHOT~a1ce9aec9d
dateFormat X
axisFormat %s
section baseline
no_agent (18.348 ms) : 18156, 18541
. : milestone, 18348,
appsec (18.591 ms) : 18401, 18782
. : milestone, 18591,
code_origins (17.936 ms) : 17758, 18114
. : milestone, 17936,
iast (17.904 ms) : 17725, 18083
. : milestone, 17904,
profiling (18.657 ms) : 18471, 18843
. : milestone, 18657,
tracing (17.977 ms) : 17798, 18155
. : milestone, 17977,
section candidate
no_agent (18.038 ms) : 17853, 18224
. : milestone, 18038,
appsec (18.683 ms) : 18494, 18872
. : milestone, 18683,
code_origins (18.042 ms) : 17863, 18221
. : milestone, 18042,
iast (18.578 ms) : 18391, 18765
. : milestone, 18578,
profiling (18.738 ms) : 18551, 18926
. : milestone, 18738,
tracing (17.904 ms) : 17728, 18079
. : milestone, 17904,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.58.0-SNAPSHOT~9e35dbf68f, baseline=1.58.0-SNAPSHOT~a1ce9aec9d
dateFormat X
axisFormat %s
section baseline
no_agent (1.199 ms) : 1187, 1211
. : milestone, 1199,
iast (3.207 ms) : 3166, 3248
. : milestone, 3207,
iast_FULL (5.698 ms) : 5642, 5755
. : milestone, 5698,
iast_GLOBAL (3.571 ms) : 3520, 3622
. : milestone, 3571,
profiling (1.985 ms) : 1968, 2001
. : milestone, 1985,
tracing (1.806 ms) : 1789, 1822
. : milestone, 1806,
section candidate
no_agent (1.196 ms) : 1184, 1208
. : milestone, 1196,
iast (3.304 ms) : 3258, 3351
. : milestone, 3304,
iast_FULL (5.731 ms) : 5673, 5788
. : milestone, 5731,
iast_GLOBAL (3.537 ms) : 3488, 3586
. : milestone, 3537,
profiling (1.96 ms) : 1944, 1976
. : milestone, 1960,
tracing (1.771 ms) : 1757, 1785
. : milestone, 1771,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 1 unstable metrics. Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.58.0-SNAPSHOT~9e35dbf68f, baseline=1.58.0-SNAPSHOT~a1ce9aec9d
dateFormat X
axisFormat %s
section baseline
no_agent (1.478 ms) : 1466, 1489
. : milestone, 1478,
appsec (3.765 ms) : 3544, 3986
. : milestone, 3765,
iast (2.233 ms) : 2168, 2298
. : milestone, 2233,
iast_GLOBAL (2.264 ms) : 2199, 2329
. : milestone, 2264,
profiling (2.091 ms) : 2038, 2144
. : milestone, 2091,
tracing (2.062 ms) : 2011, 2113
. : milestone, 2062,
section candidate
no_agent (1.483 ms) : 1471, 1495
. : milestone, 1483,
appsec (3.743 ms) : 3524, 3961
. : milestone, 3743,
iast (2.219 ms) : 2155, 2284
. : milestone, 2219,
iast_GLOBAL (2.259 ms) : 2194, 2324
. : milestone, 2259,
profiling (2.105 ms) : 2051, 2160
. : milestone, 2105,
tracing (2.064 ms) : 2013, 2115
. : milestone, 2064,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.58.0-SNAPSHOT~9e35dbf68f, baseline=1.58.0-SNAPSHOT~a1ce9aec9d
dateFormat X
axisFormat %s
section baseline
no_agent (14.785 s) : 14785000, 14785000
. : milestone, 14785000,
appsec (14.801 s) : 14801000, 14801000
. : milestone, 14801000,
iast (18.153 s) : 18153000, 18153000
. : milestone, 18153000,
iast_GLOBAL (17.92 s) : 17920000, 17920000
. : milestone, 17920000,
profiling (15.061 s) : 15061000, 15061000
. : milestone, 15061000,
tracing (14.433 s) : 14433000, 14433000
. : milestone, 14433000,
section candidate
no_agent (14.89 s) : 14890000, 14890000
. : milestone, 14890000,
appsec (14.808 s) : 14808000, 14808000
. : milestone, 14808000,
iast (18.335 s) : 18335000, 18335000
. : milestone, 18335000,
iast_GLOBAL (17.845 s) : 17845000, 17845000
. : milestone, 17845000,
profiling (14.797 s) : 14797000, 14797000
. : milestone, 14797000,
tracing (14.706 s) : 14706000, 14706000
. : milestone, 14706000,
|
What Does This Do
Forces preloading
PublishStateenum values to avoid having this classloading happening on hot path (likedecrementRefAndMaybeWrite).This particular trick will potentially avoid classloading on VirtualThread.unmount that, closing scopes, could trigger this code path.
Motivation
Additional Notes
Contributor Checklist
type:and (comp:orinst:) labels in addition to any useful labelsclose,fixor any linking keywords when referencing an issue.Use
solvesinstead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]