Introduce a generic JavaModuleOpener for JPMS#11220
Introduce a generic JavaModuleOpener for JPMS#11220
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: af12f1c5d2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
2ef2043 to
9e1153e
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9e1153e704
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 64 metrics, 7 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.62.0-SNAPSHOT~1174aaaf1f, baseline=1.62.0-SNAPSHOT~5609365061
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.067 s) : 0, 1067056
Total [baseline] (11.038 s) : 0, 11037977
Agent [candidate] (1.066 s) : 0, 1066374
Total [candidate] (10.983 s) : 0, 10983068
section appsec
Agent [baseline] (1.285 s) : 0, 1284849
Total [baseline] (11.12 s) : 0, 11120159
Agent [candidate] (1.275 s) : 0, 1274982
Total [candidate] (11.058 s) : 0, 11058204
section iast
Agent [baseline] (1.244 s) : 0, 1244467
Total [baseline] (11.293 s) : 0, 11292515
Agent [candidate] (1.252 s) : 0, 1252496
Total [candidate] (11.334 s) : 0, 11334024
section profiling
Agent [baseline] (1.19 s) : 0, 1189804
Total [baseline] (11.043 s) : 0, 11042797
Agent [candidate] (1.19 s) : 0, 1190008
Total [candidate] (11.065 s) : 0, 11064867
gantt
title petclinic - break down per module: candidate=1.62.0-SNAPSHOT~1174aaaf1f, baseline=1.62.0-SNAPSHOT~5609365061
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.232 ms) : 0, 1232
crashtracking [candidate] (1.232 ms) : 0, 1232
BytebuddyAgent [baseline] (637.836 ms) : 0, 637836
BytebuddyAgent [candidate] (637.454 ms) : 0, 637454
AgentMeter [baseline] (29.557 ms) : 0, 29557
AgentMeter [candidate] (29.349 ms) : 0, 29349
GlobalTracer [baseline] (249.839 ms) : 0, 249839
GlobalTracer [candidate] (248.859 ms) : 0, 248859
AppSec [baseline] (32.882 ms) : 0, 32882
AppSec [candidate] (32.827 ms) : 0, 32827
Debugger [baseline] (60.722 ms) : 0, 60722
Debugger [candidate] (60.749 ms) : 0, 60749
Remote Config [baseline] (598.048 µs) : 0, 598
Remote Config [candidate] (620.283 µs) : 0, 620
Telemetry [baseline] (8.395 ms) : 0, 8395
Telemetry [candidate] (8.444 ms) : 0, 8444
Flare Poller [baseline] (9.864 ms) : 0, 9864
Flare Poller [candidate] (10.732 ms) : 0, 10732
section appsec
crashtracking [baseline] (1.263 ms) : 0, 1263
crashtracking [candidate] (1.235 ms) : 0, 1235
BytebuddyAgent [baseline] (687.332 ms) : 0, 687332
BytebuddyAgent [candidate] (682.148 ms) : 0, 682148
AgentMeter [baseline] (12.465 ms) : 0, 12465
AgentMeter [candidate] (12.271 ms) : 0, 12271
GlobalTracer [baseline] (252.581 ms) : 0, 252581
GlobalTracer [candidate] (250.506 ms) : 0, 250506
IAST [baseline] (25.175 ms) : 0, 25175
IAST [candidate] (24.875 ms) : 0, 24875
AppSec [baseline] (187.275 ms) : 0, 187275
AppSec [candidate] (185.772 ms) : 0, 185772
Debugger [baseline] (65.698 ms) : 0, 65698
Debugger [candidate] (64.588 ms) : 0, 64588
Remote Config [baseline] (602.944 µs) : 0, 603
Remote Config [candidate] (576.402 µs) : 0, 576
Telemetry [baseline] (7.959 ms) : 0, 7959
Telemetry [candidate] (7.706 ms) : 0, 7706
Flare Poller [baseline] (5.196 ms) : 0, 5196
Flare Poller [candidate] (8.976 ms) : 0, 8976
section iast
crashtracking [baseline] (1.221 ms) : 0, 1221
crashtracking [candidate] (1.237 ms) : 0, 1237
BytebuddyAgent [baseline] (822.824 ms) : 0, 822824
BytebuddyAgent [candidate] (830.212 ms) : 0, 830212
AgentMeter [baseline] (11.313 ms) : 0, 11313
AgentMeter [candidate] (11.618 ms) : 0, 11618
GlobalTracer [baseline] (237.959 ms) : 0, 237959
GlobalTracer [candidate] (237.965 ms) : 0, 237965
IAST [baseline] (28.295 ms) : 0, 28295
IAST [candidate] (29.234 ms) : 0, 29234
AppSec [baseline] (31.659 ms) : 0, 31659
AppSec [candidate] (30.548 ms) : 0, 30548
Debugger [baseline] (63.141 ms) : 0, 63141
Debugger [candidate] (63.168 ms) : 0, 63168
Remote Config [baseline] (519.977 µs) : 0, 520
Remote Config [candidate] (529.674 µs) : 0, 530
Telemetry [baseline] (7.994 ms) : 0, 7994
Telemetry [candidate] (8.262 ms) : 0, 8262
Flare Poller [baseline] (3.448 ms) : 0, 3448
Flare Poller [candidate] (3.53 ms) : 0, 3530
section profiling
crashtracking [baseline] (1.196 ms) : 0, 1196
crashtracking [candidate] (1.184 ms) : 0, 1184
BytebuddyAgent [baseline] (694.082 ms) : 0, 694082
BytebuddyAgent [candidate] (693.776 ms) : 0, 693776
AgentMeter [baseline] (8.965 ms) : 0, 8965
AgentMeter [candidate] (9.207 ms) : 0, 9207
GlobalTracer [baseline] (208.834 ms) : 0, 208834
GlobalTracer [candidate] (208.361 ms) : 0, 208361
AppSec [baseline] (32.827 ms) : 0, 32827
AppSec [candidate] (32.846 ms) : 0, 32846
Debugger [baseline] (65.862 ms) : 0, 65862
Debugger [candidate] (66.587 ms) : 0, 66587
Remote Config [baseline] (577.072 µs) : 0, 577
Remote Config [candidate] (589.339 µs) : 0, 589
Telemetry [baseline] (8.104 ms) : 0, 8104
Telemetry [candidate] (8.117 ms) : 0, 8117
Flare Poller [baseline] (3.508 ms) : 0, 3508
Flare Poller [candidate] (3.566 ms) : 0, 3566
ProfilingAgent [baseline] (94.198 ms) : 0, 94198
ProfilingAgent [candidate] (94.714 ms) : 0, 94714
Profiling [baseline] (94.753 ms) : 0, 94753
Profiling [candidate] (95.268 ms) : 0, 95268
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.62.0-SNAPSHOT~1174aaaf1f, baseline=1.62.0-SNAPSHOT~5609365061
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.066 s) : 0, 1065696
Total [baseline] (8.846 s) : 0, 8845575
Agent [candidate] (1.068 s) : 0, 1068349
Total [candidate] (8.84 s) : 0, 8840418
section iast
Agent [baseline] (1.239 s) : 0, 1238972
Total [baseline] (9.541 s) : 0, 9540559
Agent [candidate] (1.244 s) : 0, 1243951
Total [candidate] (9.507 s) : 0, 9506875
gantt
title insecure-bank - break down per module: candidate=1.62.0-SNAPSHOT~1174aaaf1f, baseline=1.62.0-SNAPSHOT~5609365061
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.23 ms) : 0, 1230
crashtracking [candidate] (1.224 ms) : 0, 1224
BytebuddyAgent [baseline] (636.885 ms) : 0, 636885
BytebuddyAgent [candidate] (638.846 ms) : 0, 638846
AgentMeter [baseline] (29.534 ms) : 0, 29534
AgentMeter [candidate] (29.349 ms) : 0, 29349
GlobalTracer [baseline] (249.637 ms) : 0, 249637
GlobalTracer [candidate] (249.642 ms) : 0, 249642
AppSec [baseline] (32.789 ms) : 0, 32789
AppSec [candidate] (32.927 ms) : 0, 32927
Debugger [baseline] (59.978 ms) : 0, 59978
Debugger [candidate] (59.798 ms) : 0, 59798
Remote Config [baseline] (598.355 µs) : 0, 598
Remote Config [candidate] (608.403 µs) : 0, 608
Telemetry [baseline] (8.394 ms) : 0, 8394
Telemetry [candidate] (8.472 ms) : 0, 8472
Flare Poller [baseline] (10.559 ms) : 0, 10559
Flare Poller [candidate] (11.377 ms) : 0, 11377
section iast
crashtracking [baseline] (1.228 ms) : 0, 1228
crashtracking [candidate] (1.216 ms) : 0, 1216
BytebuddyAgent [baseline] (819.226 ms) : 0, 819226
BytebuddyAgent [candidate] (824.68 ms) : 0, 824680
AgentMeter [baseline] (11.254 ms) : 0, 11254
AgentMeter [candidate] (11.382 ms) : 0, 11382
GlobalTracer [baseline] (237.363 ms) : 0, 237363
GlobalTracer [candidate] (237.11 ms) : 0, 237110
IAST [baseline] (26.527 ms) : 0, 26527
IAST [candidate] (28.22 ms) : 0, 28220
AppSec [baseline] (32.975 ms) : 0, 32975
AppSec [candidate] (31.53 ms) : 0, 31530
Debugger [baseline] (62.54 ms) : 0, 62540
Debugger [candidate] (61.967 ms) : 0, 61967
Remote Config [baseline] (531.807 µs) : 0, 532
Remote Config [candidate] (507.141 µs) : 0, 507
Telemetry [baseline] (7.972 ms) : 0, 7972
Telemetry [candidate] (7.902 ms) : 0, 7902
Flare Poller [baseline] (3.394 ms) : 0, 3394
Flare Poller [candidate] (3.425 ms) : 0, 3425
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 2 performance regressions! Performance is the same for 18 metrics, 16 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.62.0-SNAPSHOT~1174aaaf1f, baseline=1.62.0-SNAPSHOT~5609365061
dateFormat X
axisFormat %s
section baseline
no_agent (1.271 ms) : 1258, 1284
. : milestone, 1271,
iast (3.344 ms) : 3296, 3392
. : milestone, 3344,
iast_FULL (5.96 ms) : 5900, 6020
. : milestone, 5960,
iast_GLOBAL (3.703 ms) : 3641, 3765
. : milestone, 3703,
profiling (2.233 ms) : 2208, 2257
. : milestone, 2233,
tracing (1.949 ms) : 1932, 1965
. : milestone, 1949,
section candidate
no_agent (1.263 ms) : 1252, 1275
. : milestone, 1263,
iast (3.347 ms) : 3297, 3397
. : milestone, 3347,
iast_FULL (6.229 ms) : 6164, 6293
. : milestone, 6229,
iast_GLOBAL (3.659 ms) : 3603, 3715
. : milestone, 3659,
profiling (2.367 ms) : 2345, 2389
. : milestone, 2367,
tracing (1.924 ms) : 1908, 1939
. : milestone, 1924,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.62.0-SNAPSHOT~1174aaaf1f, baseline=1.62.0-SNAPSHOT~5609365061
dateFormat X
axisFormat %s
section baseline
no_agent (17.34 ms) : 17170, 17509
. : milestone, 17340,
appsec (18.789 ms) : 18601, 18976
. : milestone, 18789,
code_origins (17.67 ms) : 17498, 17842
. : milestone, 17670,
iast (17.974 ms) : 17798, 18150
. : milestone, 17974,
profiling (18.337 ms) : 18153, 18521
. : milestone, 18337,
tracing (19.04 ms) : 18846, 19233
. : milestone, 19040,
section candidate
no_agent (17.937 ms) : 17755, 18118
. : milestone, 17937,
appsec (19.69 ms) : 19491, 19889
. : milestone, 19690,
code_origins (17.757 ms) : 17583, 17931
. : milestone, 17757,
iast (18.067 ms) : 17886, 18248
. : milestone, 18067,
profiling (18.238 ms) : 18060, 18416
. : milestone, 18238,
tracing (18.835 ms) : 18648, 19022
. : milestone, 18835,
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.62.0-SNAPSHOT~1174aaaf1f, baseline=1.62.0-SNAPSHOT~5609365061
dateFormat X
axisFormat %s
section baseline
no_agent (15.464 s) : 15464000, 15464000
. : milestone, 15464000,
appsec (14.729 s) : 14729000, 14729000
. : milestone, 14729000,
iast (18.398 s) : 18398000, 18398000
. : milestone, 18398000,
iast_GLOBAL (17.862 s) : 17862000, 17862000
. : milestone, 17862000,
profiling (15.658 s) : 15658000, 15658000
. : milestone, 15658000,
tracing (14.969 s) : 14969000, 14969000
. : milestone, 14969000,
section candidate
no_agent (15.64 s) : 15640000, 15640000
. : milestone, 15640000,
appsec (14.88 s) : 14880000, 14880000
. : milestone, 14880000,
iast (18.839 s) : 18839000, 18839000
. : milestone, 18839000,
iast_GLOBAL (18.169 s) : 18169000, 18169000
. : milestone, 18169000,
profiling (15.006 s) : 15006000, 15006000
. : milestone, 15006000,
tracing (15.213 s) : 15213000, 15213000
. : milestone, 15213000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.62.0-SNAPSHOT~1174aaaf1f, baseline=1.62.0-SNAPSHOT~5609365061
dateFormat X
axisFormat %s
section baseline
no_agent (1.492 ms) : 1481, 1504
. : milestone, 1492,
appsec (3.815 ms) : 3593, 4037
. : milestone, 3815,
iast (2.277 ms) : 2208, 2347
. : milestone, 2277,
iast_GLOBAL (2.323 ms) : 2252, 2393
. : milestone, 2323,
profiling (2.095 ms) : 2040, 2150
. : milestone, 2095,
tracing (2.076 ms) : 2023, 2130
. : milestone, 2076,
section candidate
no_agent (1.486 ms) : 1474, 1497
. : milestone, 1486,
appsec (3.802 ms) : 3580, 4023
. : milestone, 3802,
iast (2.281 ms) : 2212, 2351
. : milestone, 2281,
iast_GLOBAL (2.329 ms) : 2259, 2400
. : milestone, 2329,
profiling (2.104 ms) : 2049, 2159
. : milestone, 2104,
tracing (2.08 ms) : 2026, 2134
. : milestone, 2080,
|
What Does This Do
With analogy to
ExcludeFilterProvider, we introduceJavaModuleOpenProviderin order to imperatively declare a way to open packages to the unnamed module.This is often required by instrumentation in order to permit reflective access (especially when enforced for jdk >= 17)
Instrumentation can now declaratively implement this interface and declare a list of class which construction will "trigger" once an advice that will open the module that class belongs to to the unnamed module (taken from our bootstrap classes).
The idea is that we can inline this code, hence pass the callsite check the JVM is doing for this operation.
The advice is fired only once per java type (guarded by a cas done on an atomic boolean constructed by a ClassValue).
This PR also showcase how to use it (removes advices for mulesoft and java-net). The documentation is also updated
Motivation
Additional Notes
Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]
Note: Once your PR is ready to merge, add it to the merge queue by commenting
/merge./merge -ccancels the queue request./merge -f --reason "reason"skips all merge queue checks; please use this judiciously, as some checks do not run at the PR-level. For more information, see this doc.