Avoid initializing SMAP events on JDKs with no JFR#9231
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 47 metrics, 12 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.51.1-SNAPSHOT~410b501b8e, baseline=1.51.1-SNAPSHOT~05a10a5f19
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.043 s) : 0, 1042555
Total [baseline] (10.658 s) : 0, 10657507
Agent [candidate] (1.039 s) : 0, 1038926
Total [candidate] (10.684 s) : 0, 10683695
section appsec
Agent [baseline] (1.214 s) : 0, 1214360
Total [baseline] (10.782 s) : 0, 10782322
Agent [candidate] (1.22 s) : 0, 1219780
Total [candidate] (10.801 s) : 0, 10801271
section iast
Agent [baseline] (1.172 s) : 0, 1171822
Total [baseline] (10.878 s) : 0, 10877892
Agent [candidate] (1.183 s) : 0, 1183258
Total [candidate] (10.907 s) : 0, 10907230
section profiling
Agent [baseline] (1.19 s) : 0, 1189859
Total [baseline] (10.867 s) : 0, 10867289
Agent [candidate] (1.191 s) : 0, 1191001
Total [candidate] (10.822 s) : 0, 10821543
gantt
title petclinic - break down per module: candidate=1.51.1-SNAPSHOT~410b501b8e, baseline=1.51.1-SNAPSHOT~05a10a5f19
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.423 ms) : 0, 1423
crashtracking [candidate] (1.425 ms) : 0, 1425
BytebuddyAgent [baseline] (728.97 ms) : 0, 728970
BytebuddyAgent [candidate] (727.882 ms) : 0, 727882
GlobalTracer [baseline] (241.612 ms) : 0, 241612
GlobalTracer [candidate] (240.477 ms) : 0, 240477
AppSec [baseline] (30.339 ms) : 0, 30339
AppSec [candidate] (30.403 ms) : 0, 30403
Debugger [baseline] (6.017 ms) : 0, 6017
Debugger [candidate] (5.976 ms) : 0, 5976
Remote Config [baseline] (656.399 µs) : 0, 656
Remote Config [candidate] (635.675 µs) : 0, 636
Telemetry [baseline] (12.578 ms) : 0, 12578
Telemetry [candidate] (11.183 ms) : 0, 11183
section appsec
crashtracking [baseline] (1.431 ms) : 0, 1431
crashtracking [candidate] (1.427 ms) : 0, 1427
BytebuddyAgent [baseline] (748.93 ms) : 0, 748930
BytebuddyAgent [candidate] (752.386 ms) : 0, 752386
GlobalTracer [baseline] (234.032 ms) : 0, 234032
GlobalTracer [candidate] (234.997 ms) : 0, 234997
AppSec [baseline] (167.715 ms) : 0, 167715
AppSec [candidate] (169.265 ms) : 0, 169265
Debugger [baseline] (7.947 ms) : 0, 7947
Debugger [candidate] (7.921 ms) : 0, 7921
Remote Config [baseline] (615.791 µs) : 0, 616
Remote Config [candidate] (623.892 µs) : 0, 624
Telemetry [baseline] (8.968 ms) : 0, 8968
Telemetry [candidate] (8.303 ms) : 0, 8303
IAST [baseline] (23.547 ms) : 0, 23547
IAST [candidate] (23.57 ms) : 0, 23570
section iast
crashtracking [baseline] (1.434 ms) : 0, 1434
crashtracking [candidate] (1.474 ms) : 0, 1474
BytebuddyAgent [baseline] (845.417 ms) : 0, 845417
BytebuddyAgent [candidate] (854.897 ms) : 0, 854897
GlobalTracer [baseline] (232.461 ms) : 0, 232461
GlobalTracer [candidate] (232.557 ms) : 0, 232557
AppSec [baseline] (26.519 ms) : 0, 26519
AppSec [candidate] (26.73 ms) : 0, 26730
Debugger [baseline] (8.248 ms) : 0, 8248
Debugger [candidate] (8.455 ms) : 0, 8455
Remote Config [baseline] (591.121 µs) : 0, 591
Remote Config [candidate] (597.131 µs) : 0, 597
Telemetry [baseline] (8.114 ms) : 0, 8114
Telemetry [candidate] (8.096 ms) : 0, 8096
IAST [baseline] (28.097 ms) : 0, 28097
IAST [candidate] (29.324 ms) : 0, 29324
section profiling
ProfilingAgent [baseline] (108.004 ms) : 0, 108004
ProfilingAgent [candidate] (107.968 ms) : 0, 107968
crashtracking [baseline] (1.405 ms) : 0, 1405
crashtracking [candidate] (1.389 ms) : 0, 1389
BytebuddyAgent [baseline] (758.4 ms) : 0, 758400
BytebuddyAgent [candidate] (758.945 ms) : 0, 758945
GlobalTracer [baseline] (220.327 ms) : 0, 220327
GlobalTracer [candidate] (220.934 ms) : 0, 220934
AppSec [baseline] (30.287 ms) : 0, 30287
AppSec [candidate] (30.381 ms) : 0, 30381
Debugger [baseline] (6.181 ms) : 0, 6181
Debugger [candidate] (6.249 ms) : 0, 6249
Remote Config [baseline] (725.815 µs) : 0, 726
Remote Config [candidate] (688.666 µs) : 0, 689
Telemetry [baseline] (15.99 ms) : 0, 15990
Telemetry [candidate] (15.955 ms) : 0, 15955
Profiling [baseline] (108.026 ms) : 0, 108026
Profiling [candidate] (107.991 ms) : 0, 107991
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.51.1-SNAPSHOT~410b501b8e, baseline=1.51.1-SNAPSHOT~05a10a5f19
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.045 s) : 0, 1045257
Total [baseline] (8.606 s) : 0, 8606015
Agent [candidate] (1.052 s) : 0, 1051832
Total [candidate] (8.585 s) : 0, 8584909
section iast
Agent [baseline] (1.173 s) : 0, 1172744
Total [baseline] (9.316 s) : 0, 9316251
Agent [candidate] (1.17 s) : 0, 1169902
Total [candidate] (9.296 s) : 0, 9295651
gantt
title insecure-bank - break down per module: candidate=1.51.1-SNAPSHOT~410b501b8e, baseline=1.51.1-SNAPSHOT~05a10a5f19
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.437 ms) : 0, 1437
crashtracking [candidate] (1.47 ms) : 0, 1470
BytebuddyAgent [baseline] (732.834 ms) : 0, 732834
BytebuddyAgent [candidate] (735.977 ms) : 0, 735977
GlobalTracer [baseline] (241.839 ms) : 0, 241839
GlobalTracer [candidate] (243.142 ms) : 0, 243142
AppSec [baseline] (30.456 ms) : 0, 30456
AppSec [candidate] (30.74 ms) : 0, 30740
Debugger [baseline] (5.965 ms) : 0, 5965
Debugger [candidate] (6.013 ms) : 0, 6013
Remote Config [baseline] (651.742 µs) : 0, 652
Remote Config [candidate] (649.086 µs) : 0, 649
Telemetry [baseline] (11.104 ms) : 0, 11104
Telemetry [candidate] (12.754 ms) : 0, 12754
section iast
crashtracking [baseline] (1.426 ms) : 0, 1426
crashtracking [candidate] (1.433 ms) : 0, 1433
BytebuddyAgent [baseline] (846.705 ms) : 0, 846705
BytebuddyAgent [candidate] (845.056 ms) : 0, 845056
GlobalTracer [baseline] (232.026 ms) : 0, 232026
GlobalTracer [candidate] (230.435 ms) : 0, 230435
IAST [baseline] (29.837 ms) : 0, 29837
IAST [candidate] (30.523 ms) : 0, 30523
AppSec [baseline] (24.896 ms) : 0, 24896
AppSec [candidate] (25.502 ms) : 0, 25502
Debugger [baseline] (8.332 ms) : 0, 8332
Debugger [candidate] (7.504 ms) : 0, 7504
Remote Config [baseline] (571.995 µs) : 0, 572
Remote Config [candidate] (606.866 µs) : 0, 607
Telemetry [baseline] (8.056 ms) : 0, 8056
Telemetry [candidate] (8.025 ms) : 0, 8025
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 2 performance regressions! Performance is the same for 10 metrics, 12 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.51.1-SNAPSHOT~410b501b8e, baseline=1.51.1-SNAPSHOT~05a10a5f19
dateFormat X
axisFormat %s
section baseline
no_agent (4.381 ms) : 4331, 4432
. : milestone, 4381,
iast (9.59 ms) : 9431, 9748
. : milestone, 9590,
iast_FULL (14.123 ms) : 13842, 14404
. : milestone, 14123,
iast_GLOBAL (10.211 ms) : 10032, 10389
. : milestone, 10211,
profiling (8.755 ms) : 8604, 8907
. : milestone, 8755,
tracing (7.496 ms) : 7392, 7600
. : milestone, 7496,
section candidate
no_agent (4.341 ms) : 4290, 4391
. : milestone, 4341,
iast (9.536 ms) : 9380, 9691
. : milestone, 9536,
iast_FULL (13.877 ms) : 13605, 14150
. : milestone, 13877,
iast_GLOBAL (10.091 ms) : 9916, 10265
. : milestone, 10091,
profiling (8.96 ms) : 8804, 9116
. : milestone, 8960,
tracing (7.859 ms) : 7739, 7978
. : milestone, 7859,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.51.1-SNAPSHOT~410b501b8e, baseline=1.51.1-SNAPSHOT~05a10a5f19
dateFormat X
axisFormat %s
section baseline
no_agent (36.514 ms) : 36229, 36800
. : milestone, 36514,
appsec (47.015 ms) : 46609, 47421
. : milestone, 47015,
code_origins (46.313 ms) : 45919, 46708
. : milestone, 46313,
iast (45.414 ms) : 45006, 45823
. : milestone, 45414,
profiling (47.466 ms) : 46995, 47936
. : milestone, 47466,
tracing (43.495 ms) : 43137, 43854
. : milestone, 43495,
section candidate
no_agent (37.424 ms) : 37130, 37717
. : milestone, 37424,
appsec (46.55 ms) : 46133, 46968
. : milestone, 46550,
code_origins (45.053 ms) : 44660, 45445
. : milestone, 45053,
iast (44.948 ms) : 44559, 45338
. : milestone, 44948,
profiling (48.355 ms) : 47843, 48868
. : milestone, 48355,
tracing (46.9 ms) : 46486, 47315
. : milestone, 46900,
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 biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.51.1-SNAPSHOT~410b501b8e, baseline=1.51.1-SNAPSHOT~05a10a5f19
dateFormat X
axisFormat %s
section baseline
no_agent (15.571 s) : 15571000, 15571000
. : milestone, 15571000,
appsec (14.732 s) : 14732000, 14732000
. : milestone, 14732000,
iast (18.633 s) : 18633000, 18633000
. : milestone, 18633000,
iast_GLOBAL (17.93 s) : 17930000, 17930000
. : milestone, 17930000,
profiling (15.093 s) : 15093000, 15093000
. : milestone, 15093000,
tracing (15.12 s) : 15120000, 15120000
. : milestone, 15120000,
section candidate
no_agent (15.655 s) : 15655000, 15655000
. : milestone, 15655000,
appsec (14.84 s) : 14840000, 14840000
. : milestone, 14840000,
iast (18.317 s) : 18317000, 18317000
. : milestone, 18317000,
iast_GLOBAL (17.869 s) : 17869000, 17869000
. : milestone, 17869000,
profiling (16.108 s) : 16108000, 16108000
. : milestone, 16108000,
tracing (15.15 s) : 15150000, 15150000
. : milestone, 15150000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.51.1-SNAPSHOT~410b501b8e, baseline=1.51.1-SNAPSHOT~05a10a5f19
dateFormat X
axisFormat %s
section baseline
no_agent (1.469 ms) : 1458, 1481
. : milestone, 1469,
appsec (3.578 ms) : 3365, 3790
. : milestone, 3578,
iast (2.199 ms) : 2136, 2262
. : milestone, 2199,
iast_GLOBAL (2.234 ms) : 2171, 2298
. : milestone, 2234,
profiling (2.065 ms) : 2012, 2117
. : milestone, 2065,
tracing (2.007 ms) : 1959, 2056
. : milestone, 2007,
section candidate
no_agent (1.468 ms) : 1457, 1480
. : milestone, 1468,
appsec (3.583 ms) : 3369, 3796
. : milestone, 3583,
iast (2.189 ms) : 2126, 2253
. : milestone, 2189,
iast_GLOBAL (2.234 ms) : 2171, 2298
. : milestone, 2234,
profiling (2.042 ms) : 1992, 2093
. : milestone, 2042,
tracing (2.022 ms) : 1973, 2071
. : milestone, 2022,
|
| if (!JavaVirtualMachine.isJ9() && !JavaVirtualMachine.isOracleJDK8()) { | ||
| SMAP_ENTRY_EVENT_TYPE = EventType.getEventType(SmapEntryEvent.class); | ||
| AGGREGATED_SMAP_ENTRY_EVENT_TYPE = EventType.getEventType(AggregatedSmapEntryEvent.class); | ||
| } else { | ||
| SMAP_ENTRY_EVENT_TYPE = null; | ||
| AGGREGATED_SMAP_ENTRY_EVENT_TYPE = null; | ||
| } |
There was a problem hiding this comment.
- Small suggestion: maybe make sense to revert
ifblock?
if (isJ9() || isOracleJdk8() { ...set nulls...} else {set values} - What is special about
Oracle JDK8compared to other vendors that we need to exclude it? - I would put some comments around this explaining situation with JFR and JDKs.
There was a problem hiding this comment.
Oracle JDK 8 has an old and commercial JFR implementation which does not really support to user events. It has some rudimentary support but the capabilities and the ways to register them are vastly different.
I think we should extract the logic out to a separate component - currently we have the similar logic in various places. Unfortunately, this is a very low priority task so it may take some time till we get there.
|
@AlexeyKuznetsov-DD Thanks for the review. I hope this unblocks the CI |
What Does This Do
What title says
Motivation
Avoid errors when trying to initialize the support on JDKs without JFR
Additional Notes
Contributor Checklist
type:and (comp:orinst:) labels in addition to any usefull labelsclose,fixor any linking keywords when referencing an issue.Use
solvesinstead, and assign the PR milestone to the issue