-
Notifications
You must be signed in to change notification settings - Fork 324
🪞 9576 - Allow pre-Java 6 classes to be transformed in the debugger #9594
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
Conversation
Pre-Java 6 classes can contain JSR/RET instructions which are not
supported by ASM when the COMPUTE_FRAMES is used. This leads to
exceptions like this:
13:34:29.407 [Test worker] ERROR com.datadog.debugger.agent.DebuggerTransformer - Cannot write classfile for class: org.apache.felix.gogo.runtime.Pipe Exception:
java.lang.IllegalArgumentException: JSR/RET are not supported with computeFrames option
at org.objectweb.asm.Frame.execute(Frame.java:1028)
at org.objectweb.asm.MethodWriter.visitJumpInsn(MethodWriter.java:1147)
at org.objectweb.asm.tree.JumpInsnNode.accept(JumpInsnNode.java:79)
at org.objectweb.asm.tree.InsnList.accept(InsnList.java:144)
at org.objectweb.asm.tree.MethodNode.accept(MethodNode.java:749)
at org.objectweb.asm.tree.MethodNode.accept(MethodNode.java:647)
at org.objectweb.asm.tree.ClassNode.accept(ClassNode.java:468)
at com.datadog.debugger.agent.DebuggerTransformer.writeClassFile(DebuggerTransformer.java:492)
...
This uses ASM's JSRInlinerAdapter to rewrite the problematic JSR/RET
instructions as the class file is written.
|
Hi! 👋 Thanks for your pull request! 🎉 To help us review it, please make sure to:
If you need help, please check our contributing guidelines. |
Debugger benchmarksParameters
See matching parameters
SummaryFound 0 performance improvements and 2 performance regressions! Performance is the same for 8 metrics, 5 unstable metrics.
See unchanged results
Request duration reports for reportsgantt
title reports - request duration [CI 0.99] : candidate=None, baseline=None
dateFormat X
axisFormat %s
section baseline
noprobe (316.379 µs) : 285, 347
. : milestone, 316,
basic (275.753 µs) : 270, 282
. : milestone, 276,
loop (8.941 ms) : 8936, 8946
. : milestone, 8941,
section candidate
noprobe (317.404 µs) : 292, 342
. : milestone, 317,
basic (284.956 µs) : 278, 292
. : milestone, 285,
loop (8.961 ms) : 8956, 8965
. : milestone, 8961,
|
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 7 performance regressions! Performance is the same for 43 metrics, 9 unstable metrics.
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.54.0-SNAPSHOT~376c5150bc, baseline=1.54.0-SNAPSHOT~0094a60a80
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.005 s) : 0, 1005469
Total [baseline] (8.659 s) : 0, 8659337
Agent [candidate] (1.023 s) : 0, 1022639
Total [candidate] (8.639 s) : 0, 8638921
section iast
Agent [baseline] (1.146 s) : 0, 1145783
Total [baseline] (9.312 s) : 0, 9312253
Agent [candidate] (1.152 s) : 0, 1152122
Total [candidate] (9.354 s) : 0, 9354435
gantt
title insecure-bank - break down per module: candidate=1.54.0-SNAPSHOT~376c5150bc, baseline=1.54.0-SNAPSHOT~0094a60a80
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.462 ms) : 0, 1462
crashtracking [candidate] (1.456 ms) : 0, 1456
BytebuddyAgent [baseline] (688.344 ms) : 0, 688344
BytebuddyAgent [candidate] (687.75 ms) : 0, 687750
GlobalTracer [baseline] (247.497 ms) : 0, 247497
GlobalTracer [candidate] (257.506 ms) : 0, 257506
AppSec [baseline] (31.056 ms) : 0, 31056
AppSec [candidate] (31.602 ms) : 0, 31602
Debugger [baseline] (6.311 ms) : 0, 6311
Debugger [candidate] (6.344 ms) : 0, 6344
Remote Config [baseline] (680.95 µs) : 0, 681
Remote Config [candidate] (673.42 µs) : 0, 673
Telemetry [baseline] (9.021 ms) : 0, 9021
Telemetry [candidate] (16.335 ms) : 0, 16335
section iast
crashtracking [baseline] (1.47 ms) : 0, 1470
crashtracking [candidate] (1.448 ms) : 0, 1448
BytebuddyAgent [baseline] (810.388 ms) : 0, 810388
BytebuddyAgent [candidate] (807.753 ms) : 0, 807753
GlobalTracer [baseline] (237.893 ms) : 0, 237893
GlobalTracer [candidate] (247.572 ms) : 0, 247572
AppSec [baseline] (33.67 ms) : 0, 33670
AppSec [candidate] (27.418 ms) : 0, 27418
Debugger [baseline] (6.129 ms) : 0, 6129
Debugger [candidate] (6.217 ms) : 0, 6217
Remote Config [baseline] (597.887 µs) : 0, 598
Remote Config [candidate] (598.803 µs) : 0, 599
Telemetry [baseline] (8.242 ms) : 0, 8242
Telemetry [candidate] (8.344 ms) : 0, 8344
IAST [baseline] (26.197 ms) : 0, 26197
IAST [candidate] (31.908 ms) : 0, 31908
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.54.0-SNAPSHOT~376c5150bc, baseline=1.54.0-SNAPSHOT~0094a60a80
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.008 s) : 0, 1007763
Total [baseline] (10.61 s) : 0, 10610277
Agent [candidate] (1.02 s) : 0, 1019534
Total [candidate] (10.616 s) : 0, 10616327
section appsec
Agent [baseline] (1.193 s) : 0, 1193148
Total [baseline] (10.96 s) : 0, 10959930
Agent [candidate] (1.204 s) : 0, 1204110
Total [candidate] (10.985 s) : 0, 10985047
section iast
Agent [baseline] (1.143 s) : 0, 1143311
Total [baseline] (10.898 s) : 0, 10897822
Agent [candidate] (1.152 s) : 0, 1151955
Total [candidate] (11.086 s) : 0, 11085734
section profiling
Agent [baseline] (1.153 s) : 0, 1152543
Total [baseline] (10.992 s) : 0, 10992070
Agent [candidate] (1.171 s) : 0, 1171086
Total [candidate] (11.057 s) : 0, 11056529
gantt
title petclinic - break down per module: candidate=1.54.0-SNAPSHOT~376c5150bc, baseline=1.54.0-SNAPSHOT~0094a60a80
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.475 ms) : 0, 1475
crashtracking [candidate] (1.442 ms) : 0, 1442
BytebuddyAgent [baseline] (689.141 ms) : 0, 689141
BytebuddyAgent [candidate] (686.734 ms) : 0, 686734
GlobalTracer [baseline] (248.438 ms) : 0, 248438
GlobalTracer [candidate] (257.48 ms) : 0, 257480
AppSec [baseline] (31.356 ms) : 0, 31356
AppSec [candidate] (31.728 ms) : 0, 31728
Debugger [baseline] (6.341 ms) : 0, 6341
Debugger [candidate] (6.388 ms) : 0, 6388
Remote Config [baseline] (684.296 µs) : 0, 684
Remote Config [candidate] (689.294 µs) : 0, 689
Telemetry [baseline] (9.106 ms) : 0, 9106
Telemetry [candidate] (14.07 ms) : 0, 14070
section appsec
crashtracking [baseline] (1.49 ms) : 0, 1490
crashtracking [candidate] (1.467 ms) : 0, 1467
BytebuddyAgent [baseline] (716.583 ms) : 0, 716583
BytebuddyAgent [candidate] (716.624 ms) : 0, 716624
GlobalTracer [baseline] (241.496 ms) : 0, 241496
GlobalTracer [candidate] (251.424 ms) : 0, 251424
AppSec [baseline] (172.172 ms) : 0, 172172
AppSec [candidate] (171.456 ms) : 0, 171456
Debugger [baseline] (6.022 ms) : 0, 6022
Debugger [candidate] (6.138 ms) : 0, 6138
Remote Config [baseline] (651.105 µs) : 0, 651
Remote Config [candidate] (615.117 µs) : 0, 615
Telemetry [baseline] (8.453 ms) : 0, 8453
Telemetry [candidate] (10.031 ms) : 0, 10031
IAST [baseline] (25.049 ms) : 0, 25049
IAST [candidate] (25.12 ms) : 0, 25120
section iast
crashtracking [baseline] (1.464 ms) : 0, 1464
crashtracking [candidate] (1.459 ms) : 0, 1459
BytebuddyAgent [baseline] (808.219 ms) : 0, 808219
BytebuddyAgent [candidate] (808.045 ms) : 0, 808045
GlobalTracer [baseline] (237.658 ms) : 0, 237658
GlobalTracer [candidate] (247.574 ms) : 0, 247574
AppSec [baseline] (33.625 ms) : 0, 33625
AppSec [candidate] (27.218 ms) : 0, 27218
Debugger [baseline] (6.08 ms) : 0, 6080
Debugger [candidate] (6.169 ms) : 0, 6169
Remote Config [baseline] (595.808 µs) : 0, 596
Remote Config [candidate] (594.72 µs) : 0, 595
Telemetry [baseline] (8.191 ms) : 0, 8191
Telemetry [candidate] (8.258 ms) : 0, 8258
IAST [baseline] (26.234 ms) : 0, 26234
IAST [candidate] (31.679 ms) : 0, 31679
section profiling
crashtracking [baseline] (1.443 ms) : 0, 1443
crashtracking [candidate] (1.443 ms) : 0, 1443
BytebuddyAgent [baseline] (719.103 ms) : 0, 719103
BytebuddyAgent [candidate] (724.809 ms) : 0, 724809
GlobalTracer [baseline] (224.152 ms) : 0, 224152
GlobalTracer [candidate] (236.119 ms) : 0, 236119
AppSec [baseline] (31.56 ms) : 0, 31560
AppSec [candidate] (31.442 ms) : 0, 31442
Debugger [baseline] (7.26 ms) : 0, 7260
Debugger [candidate] (6.578 ms) : 0, 6578
Remote Config [baseline] (713.881 µs) : 0, 714
Remote Config [candidate] (713.848 µs) : 0, 714
Telemetry [baseline] (14.814 ms) : 0, 14814
Telemetry [candidate] (16.762 ms) : 0, 16762
ProfilingAgent [baseline] (102.357 ms) : 0, 102357
ProfilingAgent [candidate] (101.935 ms) : 0, 101935
Profiling [baseline] (102.957 ms) : 0, 102957
Profiling [candidate] (102.516 ms) : 0, 102516
LoadParameters
See matching parameters
SummaryFound 4 performance improvements and 0 performance regressions! Performance is the same for 8 metrics, 12 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.54.0-SNAPSHOT~376c5150bc, baseline=1.54.0-SNAPSHOT~0094a60a80
dateFormat X
axisFormat %s
section baseline
no_agent (4.431 ms) : 4381, 4481
. : milestone, 4431,
iast (10.177 ms) : 10006, 10348
. : milestone, 10177,
iast_FULL (14.566 ms) : 14275, 14857
. : milestone, 14566,
iast_GLOBAL (10.425 ms) : 10242, 10608
. : milestone, 10425,
profiling (9.168 ms) : 9026, 9309
. : milestone, 9168,
tracing (7.872 ms) : 7760, 7985
. : milestone, 7872,
section candidate
no_agent (4.397 ms) : 4347, 4447
. : milestone, 4397,
iast (9.382 ms) : 9217, 9547
. : milestone, 9382,
iast_FULL (14.591 ms) : 14299, 14883
. : milestone, 14591,
iast_GLOBAL (10.501 ms) : 10316, 10687
. : milestone, 10501,
profiling (8.679 ms) : 8549, 8810
. : milestone, 8679,
tracing (7.74 ms) : 7632, 7849
. : milestone, 7740,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.54.0-SNAPSHOT~376c5150bc, baseline=1.54.0-SNAPSHOT~0094a60a80
dateFormat X
axisFormat %s
section baseline
no_agent (36.963 ms) : 36663, 37264
. : milestone, 36963,
appsec (49.494 ms) : 49047, 49940
. : milestone, 49494,
code_origins (45.034 ms) : 44649, 45418
. : milestone, 45034,
iast (45.169 ms) : 44771, 45567
. : milestone, 45169,
profiling (48.221 ms) : 47798, 48643
. : milestone, 48221,
tracing (45.722 ms) : 45337, 46107
. : milestone, 45722,
section candidate
no_agent (37.235 ms) : 36937, 37534
. : milestone, 37235,
appsec (47.751 ms) : 47336, 48166
. : milestone, 47751,
code_origins (45.123 ms) : 44735, 45511
. : milestone, 45123,
iast (46.228 ms) : 45827, 46630
. : milestone, 46228,
profiling (49.455 ms) : 48942, 49969
. : milestone, 49455,
tracing (44.215 ms) : 43829, 44602
. : milestone, 44215,
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.54.0-SNAPSHOT~376c5150bc, baseline=1.54.0-SNAPSHOT~0094a60a80
dateFormat X
axisFormat %s
section baseline
no_agent (15.492 s) : 15492000, 15492000
. : milestone, 15492000,
appsec (14.959 s) : 14959000, 14959000
. : milestone, 14959000,
iast (18.463 s) : 18463000, 18463000
. : milestone, 18463000,
iast_GLOBAL (17.851 s) : 17851000, 17851000
. : milestone, 17851000,
profiling (15.347 s) : 15347000, 15347000
. : milestone, 15347000,
tracing (15.299 s) : 15299000, 15299000
. : milestone, 15299000,
section candidate
no_agent (14.989 s) : 14989000, 14989000
. : milestone, 14989000,
appsec (15.014 s) : 15014000, 15014000
. : milestone, 15014000,
iast (18.197 s) : 18197000, 18197000
. : milestone, 18197000,
iast_GLOBAL (18.136 s) : 18136000, 18136000
. : milestone, 18136000,
profiling (15.142 s) : 15142000, 15142000
. : milestone, 15142000,
tracing (15.356 s) : 15356000, 15356000
. : milestone, 15356000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.54.0-SNAPSHOT~376c5150bc, baseline=1.54.0-SNAPSHOT~0094a60a80
dateFormat X
axisFormat %s
section baseline
no_agent (1.469 ms) : 1457, 1480
. : milestone, 1469,
appsec (3.714 ms) : 3496, 3931
. : milestone, 3714,
iast (2.184 ms) : 2121, 2247
. : milestone, 2184,
iast_GLOBAL (2.237 ms) : 2174, 2300
. : milestone, 2237,
profiling (2.071 ms) : 2019, 2123
. : milestone, 2071,
tracing (2.011 ms) : 1962, 2060
. : milestone, 2011,
section candidate
no_agent (1.474 ms) : 1462, 1485
. : milestone, 1474,
appsec (3.673 ms) : 3458, 3888
. : milestone, 3673,
iast (2.195 ms) : 2132, 2258
. : milestone, 2195,
iast_GLOBAL (2.235 ms) : 2172, 2298
. : milestone, 2235,
profiling (2.042 ms) : 1991, 2092
. : milestone, 2042,
tracing (2.028 ms) : 1978, 2077
. : milestone, 2028,
|
|
Closing. Used as test for #9602 |
This PR mirrors the changes from the original community contribution to enable CI testing with maintainer privileges.
Original PR: #9576
Original Author: @deejgregor
Original Branch: deejgregor/dd-trace-java:debugger-java-5-classes
This is an automated mirror created to run CI checks. All credit goes to the original contributor @deejgregor.