-
Notifications
You must be signed in to change notification settings - Fork 292
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
Improve isolation of embedded JFFI dependency #7789
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mcculls
force-pushed
the
mcculls/improve-jffi-isolation
branch
2 times, most recently
from
October 17, 2024 15:34
8717290
to
0740aa1
Compare
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 53 metrics, 10 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.42.0-SNAPSHOT~167dca9227, baseline=1.42.0-SNAPSHOT~f687c2d038
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.077 s) : 0, 1076629
Total [baseline] (8.582 s) : 0, 8581923
Agent [candidate] (1.078 s) : 0, 1078328
Total [candidate] (8.577 s) : 0, 8577063
section iast
Agent [baseline] (1.211 s) : 0, 1211137
Total [baseline] (9.121 s) : 0, 9120953
Agent [candidate] (1.204 s) : 0, 1203732
Total [candidate] (9.133 s) : 0, 9133062
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.209 s) : 0, 1209273
Total [baseline] (9.083 s) : 0, 9083191
Agent [candidate] (1.204 s) : 0, 1203736
Total [candidate] (9.069 s) : 0, 9069241
section iast_TELEMETRY_OFF
Agent [baseline] (1.209 s) : 0, 1208510
Total [baseline] (9.121 s) : 0, 9121155
Agent [candidate] (1.207 s) : 0, 1206969
Total [candidate] (9.08 s) : 0, 9079674
gantt
title insecure-bank - break down per module: candidate=1.42.0-SNAPSHOT~167dca9227, baseline=1.42.0-SNAPSHOT~f687c2d038
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (685.762 ms) : 0, 685762
BytebuddyAgent [candidate] (686.953 ms) : 0, 686953
GlobalTracer [baseline] (312.439 ms) : 0, 312439
GlobalTracer [candidate] (312.908 ms) : 0, 312908
AppSec [baseline] (53.864 ms) : 0, 53864
AppSec [candidate] (53.872 ms) : 0, 53872
Remote Config [baseline] (669.542 µs) : 0, 670
Remote Config [candidate] (661.638 µs) : 0, 662
Telemetry [baseline] (10.204 ms) : 0, 10204
Telemetry [candidate] (10.161 ms) : 0, 10161
section iast
BytebuddyAgent [baseline] (807.806 ms) : 0, 807806
BytebuddyAgent [candidate] (802.598 ms) : 0, 802598
GlobalTracer [baseline] (303.827 ms) : 0, 303827
GlobalTracer [candidate] (302.147 ms) : 0, 302147
AppSec [baseline] (56.101 ms) : 0, 56101
AppSec [candidate] (57.09 ms) : 0, 57090
IAST [baseline] (21.097 ms) : 0, 21097
IAST [candidate] (20.398 ms) : 0, 20398
Remote Config [baseline] (607.856 µs) : 0, 608
Remote Config [candidate] (612.381 µs) : 0, 612
Telemetry [baseline] (7.858 ms) : 0, 7858
Telemetry [candidate] (7.091 ms) : 0, 7091
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (806.205 ms) : 0, 806205
BytebuddyAgent [candidate] (802.409 ms) : 0, 802409
GlobalTracer [baseline] (303.918 ms) : 0, 303918
GlobalTracer [candidate] (301.961 ms) : 0, 301961
AppSec [baseline] (57.45 ms) : 0, 57450
AppSec [candidate] (56.675 ms) : 0, 56675
IAST [baseline] (20.216 ms) : 0, 20216
IAST [candidate] (20.444 ms) : 0, 20444
Remote Config [baseline] (591.713 µs) : 0, 592
Remote Config [candidate] (593.296 µs) : 0, 593
Telemetry [baseline] (7.107 ms) : 0, 7107
Telemetry [candidate] (7.884 ms) : 0, 7884
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (804.919 ms) : 0, 804919
BytebuddyAgent [candidate] (804.364 ms) : 0, 804364
GlobalTracer [baseline] (304.132 ms) : 0, 304132
GlobalTracer [candidate] (303.599 ms) : 0, 303599
AppSec [baseline] (56.459 ms) : 0, 56459
AppSec [candidate] (57.443 ms) : 0, 57443
IAST [baseline] (21.622 ms) : 0, 21622
IAST [candidate] (20.112 ms) : 0, 20112
Remote Config [baseline] (591.893 µs) : 0, 592
Remote Config [candidate] (594.132 µs) : 0, 594
Telemetry [baseline] (6.987 ms) : 0, 6987
Telemetry [candidate] (6.989 ms) : 0, 6989
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.42.0-SNAPSHOT~167dca9227, baseline=1.42.0-SNAPSHOT~f687c2d038
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.076 s) : 0, 1075904
Total [baseline] (10.437 s) : 0, 10437114
Agent [candidate] (1.092 s) : 0, 1091933
Total [candidate] (10.399 s) : 0, 10398808
section appsec
Agent [baseline] (1.21 s) : 0, 1209986
Total [baseline] (10.593 s) : 0, 10592701
Agent [candidate] (1.213 s) : 0, 1212651
Total [candidate] (10.61 s) : 0, 10610118
section iast
Agent [baseline] (1.209 s) : 0, 1208604
Total [baseline] (10.908 s) : 0, 10907982
Agent [candidate] (1.205 s) : 0, 1204662
Total [candidate] (10.831 s) : 0, 10830680
section profiling
Agent [baseline] (1.277 s) : 0, 1277258
Total [baseline] (10.689 s) : 0, 10688878
Agent [candidate] (1.274 s) : 0, 1273648
Total [candidate] (10.678 s) : 0, 10678362
gantt
title petclinic - break down per module: candidate=1.42.0-SNAPSHOT~167dca9227, baseline=1.42.0-SNAPSHOT~f687c2d038
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (685.748 ms) : 0, 685748
BytebuddyAgent [candidate] (694.629 ms) : 0, 694629
GlobalTracer [baseline] (312.273 ms) : 0, 312273
GlobalTracer [candidate] (317.096 ms) : 0, 317096
AppSec [baseline] (53.805 ms) : 0, 53805
AppSec [candidate] (54.628 ms) : 0, 54628
Remote Config [baseline] (659.809 µs) : 0, 660
Remote Config [candidate] (674.61 µs) : 0, 675
Telemetry [baseline] (9.731 ms) : 0, 9731
Telemetry [candidate] (11.065 ms) : 0, 11065
section appsec
BytebuddyAgent [baseline] (702.628 ms) : 0, 702628
BytebuddyAgent [candidate] (704.85 ms) : 0, 704850
GlobalTracer [baseline] (309.322 ms) : 0, 309322
GlobalTracer [candidate] (310.495 ms) : 0, 310495
AppSec [baseline] (165.923 ms) : 0, 165923
AppSec [candidate] (165.388 ms) : 0, 165388
Remote Config [baseline] (632.901 µs) : 0, 633
Remote Config [candidate] (635.021 µs) : 0, 635
Telemetry [baseline] (8.172 ms) : 0, 8172
Telemetry [candidate] (7.793 ms) : 0, 7793
IAST [baseline] (19.289 ms) : 0, 19289
IAST [candidate] (19.429 ms) : 0, 19429
section iast
BytebuddyAgent [baseline] (806.153 ms) : 0, 806153
BytebuddyAgent [candidate] (803.413 ms) : 0, 803413
GlobalTracer [baseline] (303.064 ms) : 0, 303064
GlobalTracer [candidate] (302.144 ms) : 0, 302144
AppSec [baseline] (55.346 ms) : 0, 55346
AppSec [candidate] (57.247 ms) : 0, 57247
Remote Config [baseline] (587.123 µs) : 0, 587
Remote Config [candidate] (600.865 µs) : 0, 601
Telemetry [baseline] (6.97 ms) : 0, 6970
Telemetry [candidate] (6.965 ms) : 0, 6965
IAST [baseline] (22.699 ms) : 0, 22699
IAST [candidate] (20.481 ms) : 0, 20481
section profiling
BytebuddyAgent [baseline] (681.411 ms) : 0, 681411
BytebuddyAgent [candidate] (680.388 ms) : 0, 680388
GlobalTracer [baseline] (397.184 ms) : 0, 397184
GlobalTracer [candidate] (395.87 ms) : 0, 395870
AppSec [baseline] (54.787 ms) : 0, 54787
AppSec [candidate] (54.38 ms) : 0, 54380
Remote Config [baseline] (653.784 µs) : 0, 654
Remote Config [candidate] (646.194 µs) : 0, 646
Telemetry [baseline] (12.329 ms) : 0, 12329
Telemetry [candidate] (14.418 ms) : 0, 14418
ProfilingAgent [baseline] (92.022 ms) : 0, 92022
ProfilingAgent [candidate] (89.006 ms) : 0, 89006
Profiling [baseline] (92.045 ms) : 0, 92045
Profiling [candidate] (89.03 ms) : 0, 89030
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 16 unstable metrics. Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.42.0-SNAPSHOT~167dca9227, baseline=1.42.0-SNAPSHOT~f687c2d038
dateFormat X
axisFormat %s
section baseline
no_agent (1.348 ms) : 1329, 1368
. : milestone, 1348,
appsec (1.719 ms) : 1693, 1745
. : milestone, 1719,
appsec_no_iast (1.713 ms) : 1689, 1738
. : milestone, 1713,
iast (1.487 ms) : 1464, 1510
. : milestone, 1487,
profiling (1.489 ms) : 1465, 1514
. : milestone, 1489,
tracing (1.471 ms) : 1446, 1495
. : milestone, 1471,
section candidate
no_agent (1.356 ms) : 1336, 1375
. : milestone, 1356,
appsec (1.719 ms) : 1695, 1744
. : milestone, 1719,
appsec_no_iast (1.724 ms) : 1699, 1748
. : milestone, 1724,
iast (1.501 ms) : 1478, 1523
. : milestone, 1501,
profiling (1.492 ms) : 1469, 1516
. : milestone, 1492,
tracing (1.474 ms) : 1449, 1499
. : milestone, 1474,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.42.0-SNAPSHOT~167dca9227, baseline=1.42.0-SNAPSHOT~f687c2d038
dateFormat X
axisFormat %s
section baseline
no_agent (372.272 µs) : 352, 392
. : milestone, 372,
iast (496.568 µs) : 474, 519
. : milestone, 497,
iast_FULL (557.234 µs) : 536, 579
. : milestone, 557,
iast_GLOBAL (514.864 µs) : 493, 537
. : milestone, 515,
iast_HARDCODED_SECRET_DISABLED (490.871 µs) : 469, 512
. : milestone, 491,
iast_INACTIVE (455.398 µs) : 435, 476
. : milestone, 455,
iast_TELEMETRY_OFF (478.866 µs) : 458, 500
. : milestone, 479,
tracing (447.593 µs) : 427, 468
. : milestone, 448,
section candidate
no_agent (370.842 µs) : 350, 392
. : milestone, 371,
iast (491.605 µs) : 470, 513
. : milestone, 492,
iast_FULL (558.857 µs) : 538, 580
. : milestone, 559,
iast_GLOBAL (521.769 µs) : 499, 545
. : milestone, 522,
iast_HARDCODED_SECRET_DISABLED (490.876 µs) : 470, 512
. : milestone, 491,
iast_INACTIVE (455.474 µs) : 434, 477
. : milestone, 455,
iast_TELEMETRY_OFF (477.651 µs) : 456, 499
. : milestone, 478,
tracing (445.459 µs) : 425, 466
. : milestone, 445,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics. Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.42.0-SNAPSHOT~167dca9227, baseline=1.42.0-SNAPSHOT~f687c2d038
dateFormat X
axisFormat %s
section baseline
no_agent (1.465 ms) : 1454, 1476
. : milestone, 1465,
appsec (2.329 ms) : 2288, 2371
. : milestone, 2329,
iast (2.08 ms) : 2028, 2133
. : milestone, 2080,
iast_GLOBAL (2.123 ms) : 2070, 2176
. : milestone, 2123,
profiling (1.95 ms) : 1907, 1993
. : milestone, 1950,
tracing (1.921 ms) : 1882, 1961
. : milestone, 1921,
section candidate
no_agent (1.467 ms) : 1455, 1478
. : milestone, 1467,
appsec (2.314 ms) : 2273, 2354
. : milestone, 2314,
iast (2.081 ms) : 2029, 2133
. : milestone, 2081,
iast_GLOBAL (2.124 ms) : 2072, 2177
. : milestone, 2124,
profiling (1.944 ms) : 1901, 1987
. : milestone, 1944,
tracing (1.931 ms) : 1891, 1971
. : milestone, 1931,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.42.0-SNAPSHOT~167dca9227, baseline=1.42.0-SNAPSHOT~f687c2d038
dateFormat X
axisFormat %s
section baseline
no_agent (15.234 s) : 15234000, 15234000
. : milestone, 15234000,
appsec (15.068 s) : 15068000, 15068000
. : milestone, 15068000,
iast (19.277 s) : 19277000, 19277000
. : milestone, 19277000,
iast_GLOBAL (17.854 s) : 17854000, 17854000
. : milestone, 17854000,
profiling (15.22 s) : 15220000, 15220000
. : milestone, 15220000,
tracing (15.118 s) : 15118000, 15118000
. : milestone, 15118000,
section candidate
no_agent (15.323 s) : 15323000, 15323000
. : milestone, 15323000,
appsec (14.928 s) : 14928000, 14928000
. : milestone, 14928000,
iast (18.788 s) : 18788000, 18788000
. : milestone, 18788000,
iast_GLOBAL (17.968 s) : 17968000, 17968000
. : milestone, 17968000,
profiling (15.428 s) : 15428000, 15428000
. : milestone, 15428000,
tracing (15.369 s) : 15369000, 15369000
. : milestone, 15369000,
|
mcculls
added
comp: core
Tracer core
and removed
tag: do not merge
Do not merge changes
labels
Oct 17, 2024
mcculls
changed the title
[WIP] Improve isolation of embedded JFFI dependency
Improve isolation of embedded JFFI dependency
Oct 17, 2024
smola
approved these changes
Oct 17, 2024
dougqh
reviewed
Oct 17, 2024
dougqh
reviewed
Oct 17, 2024
dougqh
reviewed
Oct 17, 2024
dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/DatadogClassLoader.java
Show resolved
Hide resolved
mcculls
force-pushed
the
mcculls/improve-jffi-isolation
branch
2 times, most recently
from
October 17, 2024 19:57
5801dc8
to
495c7fb
Compare
mcculls
force-pushed
the
mcculls/improve-jffi-isolation
branch
from
October 21, 2024 09:24
495c7fb
to
167dca9
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What Does This Do
Isolates our embedded JFFI dependency from other versions that might be on the boot or system class-paths.
Motivation
Avoids some obscure linkage exceptions that can happen when multiple versions of JFFI are on the class-path.
Additional Notes
This PR contains two changes:
com.kenai.jffi
classes from our isolatiingDatadogClassLoader
com.kenai.jffi.Init
with a much simplerPatchInit
class that loads from the same isolating class-loaderNote we cannot fully shade JFFI (or the related JNR dependency) because it has a native component which would also need to be updated and recompiled for every platform.
Contributor Checklist
type:
and (comp:
orinst:
) labels in addition to any usefull labelsclose
,fix
or any linking keywords when referencing an issue.Use
solves
instead, and assign the PR milestone to the issueJira ticket: APMS-13480