Skip to content

Conversation

@jpbempel
Copy link
Member

What Does This Do

This uses ASM's JSRInlinerAdapter in DebuggerTransformer, allowing Dynamic Instrumentation probes to be successfully used in pre-Java 6 classes.

Motivation

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 when using Dynamic Instrumentation probes:

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 occurs when two things are true:

  1. COMPUTE_FRAMES is set in the ASM ClassWriter, which it the case in DebuggerTransformer.
  2. A pre-Java 6 class method with finally block is compiled with an older compiler that emits JSR/RET instructions.

In my case, I was trying to add Dynamic Instrumentation probes to an old IBM class and ran into this problem.

Additional Notes

JSRInlinerAdapter only inlines when the JSR instruction is seen

Always using JSRInlinerAdapter should be safe here because it only modifies the method if it has a JSR instruction, in which case the class would have failed to be written without this fix. See this comment in JSRInlinerAdapter:

If any JSRs were seen, triggers the inlining process. Otherwise, forwards
the byte codes untouched.

Most other uses of COMPUTE_FRAMES look safe, one might need updated

I looked at the other uses of COMPUTE_FRAMES in dd-trace-java and I think only one of them might be impacted in a similar way, IastSecurityControlTransformer. I'm not familiar with IAST, and I don't know this can be used on arbitrary classes or if its use is on specific classes controlled by the agent. If it is impacted in the former case, I'm happy to apply the same fix there, as well.

I don't think these other uses are impacted:

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@jpbempel jpbempel added type: bug Bug report and fix tag: community Community contribution comp: debugger Dynamic Instrumentation labels Sep 23, 2025
@jpbempel jpbempel marked this pull request as ready for review September 23, 2025 08:25
@jpbempel jpbempel requested a review from a team as a code owner September 23, 2025 08:25
@jpbempel jpbempel requested review from ojung and removed request for a team September 23, 2025 08:25
@datadog-datadog-prod-us1
Copy link
Contributor

datadog-datadog-prod-us1 bot commented Sep 23, 2025

🎯 Code Coverage
Patch Coverage: 100.00%
Total Coverage: 63.07% (+3.28%)

View detailed report

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: b24605d | Docs | Was this helpful? Give us feedback!

@pr-commenter
Copy link

pr-commenter bot commented Sep 23, 2025

Debugger benchmarks

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
ci_job_date 1758632293 1758632639
end_time 2025-09-23T12:59:34 2025-09-23T13:05:20
git_branch master jpbempel/deejgregor-debugger-java-5-classes
git_commit_sha 0094a60 b24605d
start_time 2025-09-23T12:58:14 2025-09-23T13:04:00
See matching parameters
Baseline Candidate
ci_job_id 1142996304 1142996304
ci_pipeline_id 77273236 77273236
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
git_commit_date 1758631652 1758631652

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 9 metrics, 6 unstable metrics.

See unchanged results
scenario Δ mean agg_http_req_duration_min Δ mean agg_http_req_duration_p50 Δ mean agg_http_req_duration_p75 Δ mean agg_http_req_duration_p99 Δ mean throughput
scenario:noprobe unstable
[-57.019µs; +25.510µs] or [-19.412%; +8.685%]
unstable
[-68.721µs; +34.239µs] or [-20.429%; +10.178%]
unstable
[-82.751µs; +41.863µs] or [-23.448%; +11.862%]
unstable
[-442.147µs; +263.628µs] or [-40.897%; +24.385%]
same
scenario:basic same same same unstable
[-87.741µs; +73.293µs] or [-12.056%; +10.070%]
unstable
[-195.141op/s; +195.141op/s] or [-7.415%; +7.415%]
scenario:loop unsure
[-12.065µs; -3.803µs] or [-0.136%; -0.043%]
unsure
[-12.286µs; -0.137µs] or [-0.137%; -0.002%]
same same same
Request duration reports for reports
gantt
    title reports - request duration [CI 0.99] : candidate=None, baseline=None
    dateFormat X
    axisFormat %s
section baseline
noprobe (336.39 µs) : 273, 400
.   : milestone, 336,
basic (281.053 µs) : 274, 288
.   : milestone, 281,
loop (8.965 ms) : 8959, 8971
.   : milestone, 8965,
section candidate
noprobe (319.149 µs) : 291, 348
.   : milestone, 319,
basic (279.631 µs) : 273, 286
.   : milestone, 280,
loop (8.959 ms) : 8954, 8964
.   : milestone, 8959,
Loading
  • baseline results
Scenario Request median duration [CI 0.99]
noprobe 336.39 µs [273.248 µs, 399.532 µs]
basic 281.053 µs [274.236 µs, 287.87 µs]
loop 8.965 ms [8.959 ms, 8.971 ms]
  • candidate results
Scenario Request median duration [CI 0.99]
noprobe 319.149 µs [290.574 µs, 347.725 µs]
basic 279.631 µs [272.82 µs, 286.443 µs]
loop 8.959 ms [8.954 ms, 8.964 ms]

@pr-commenter
Copy link

pr-commenter bot commented Sep 23, 2025

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master jpbempel/deejgregor-debugger-java-5-classes
git_commit_date 1758615873 1758631652
git_commit_sha 0094a60 b24605d
release_version 1.54.0-SNAPSHOT~0094a60a80 1.54.0-SNAPSHOT~b24605d047
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1758633594 1758633594
ci_job_id 1142996297 1142996297
ci_pipeline_id 77273236 77273236
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-0-1d8gdtfe 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-0-1d8gdtfe 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
module Agent Agent
parent None None

Summary

Found 0 performance improvements and 6 performance regressions! Performance is the same for 42 metrics, 11 unstable metrics.

scenario Δ mean execution_time candidate mean execution_time baseline mean execution_time
scenario:startup:insecure-bank:iast:GlobalTracer worse
[+8.993ms; +16.038ms] or [+3.805%; +6.786%]
248.843ms 236.328ms
scenario:startup:insecure-bank:tracing:GlobalTracer worse
[+8.497ms; +10.004ms] or [+3.433%; +4.042%]
256.770ms 247.519ms
scenario:startup:petclinic:appsec:GlobalTracer worse
[+5.670ms; +14.915ms] or [+2.357%; +6.199%]
250.894ms 240.602ms
scenario:startup:petclinic:iast:GlobalTracer worse
[+8.135ms; +10.452ms] or [+3.416%; +4.389%]
247.424ms 238.131ms
scenario:startup:petclinic:profiling:GlobalTracer worse
[+8.032ms; +14.802ms] or [+3.587%; +6.611%]
235.337ms 223.920ms
scenario:startup:petclinic:tracing:GlobalTracer worse
[+8.157ms; +14.982ms] or [+3.296%; +6.054%]
259.034ms 247.465ms
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.54.0-SNAPSHOT~b24605d047, baseline=1.54.0-SNAPSHOT~0094a60a80

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.005 s) : 0, 1004976
Total [baseline] (8.611 s) : 0, 8611468
Agent [candidate] (1.016 s) : 0, 1016297
Total [candidate] (8.624 s) : 0, 8624131
section iast
Agent [baseline] (1.14 s) : 0, 1139596
Total [baseline] (9.286 s) : 0, 9285591
Agent [candidate] (1.155 s) : 0, 1155491
Total [candidate] (9.33 s) : 0, 9330309
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.005 s -
Agent iast 1.14 s 134.621 ms (13.4%)
Total tracing 8.611 s -
Total iast 9.286 s 674.123 ms (7.8%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.016 s -
Agent iast 1.155 s 139.194 ms (13.7%)
Total tracing 8.624 s -
Total iast 9.33 s 706.178 ms (8.2%)
gantt
    title insecure-bank - break down per module: candidate=1.54.0-SNAPSHOT~b24605d047, baseline=1.54.0-SNAPSHOT~0094a60a80

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.488 ms) : 0, 1488
crashtracking [candidate] (1.461 ms) : 0, 1461
BytebuddyAgent [baseline] (687.73 ms) : 0, 687730
BytebuddyAgent [candidate] (685.616 ms) : 0, 685616
GlobalTracer [baseline] (247.519 ms) : 0, 247519
GlobalTracer [candidate] (256.77 ms) : 0, 256770
AppSec [baseline] (30.975 ms) : 0, 30975
AppSec [candidate] (31.44 ms) : 0, 31440
Debugger [baseline] (6.315 ms) : 0, 6315
Debugger [candidate] (6.317 ms) : 0, 6317
Remote Config [baseline] (683.345 µs) : 0, 683
Remote Config [candidate] (669.905 µs) : 0, 670
Telemetry [baseline] (9.047 ms) : 0, 9047
Telemetry [candidate] (13.181 ms) : 0, 13181
section iast
crashtracking [baseline] (1.464 ms) : 0, 1464
crashtracking [candidate] (1.464 ms) : 0, 1464
BytebuddyAgent [baseline] (805.983 ms) : 0, 805983
BytebuddyAgent [candidate] (809.843 ms) : 0, 809843
GlobalTracer [baseline] (236.328 ms) : 0, 236328
GlobalTracer [candidate] (248.843 ms) : 0, 248843
AppSec [baseline] (33.736 ms) : 0, 33736
AppSec [candidate] (27.353 ms) : 0, 27353
Debugger [baseline] (6.103 ms) : 0, 6103
Debugger [candidate] (6.232 ms) : 0, 6232
Remote Config [baseline] (589.166 µs) : 0, 589
Remote Config [candidate] (611.211 µs) : 0, 611
Telemetry [baseline] (8.253 ms) : 0, 8253
Telemetry [candidate] (8.384 ms) : 0, 8384
IAST [baseline] (26.06 ms) : 0, 26060
IAST [candidate] (31.893 ms) : 0, 31893
Loading
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.54.0-SNAPSHOT~b24605d047, baseline=1.54.0-SNAPSHOT~0094a60a80

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.003 s) : 0, 1003331
Total [baseline] (10.648 s) : 0, 10647638
Agent [candidate] (1.025 s) : 0, 1025174
Total [candidate] (10.708 s) : 0, 10707997
section appsec
Agent [baseline] (1.191 s) : 0, 1191271
Total [baseline] (11.005 s) : 0, 11005389
Agent [candidate] (1.202 s) : 0, 1202207
Total [candidate] (10.885 s) : 0, 10885086
section iast
Agent [baseline] (1.144 s) : 0, 1144454
Total [baseline] (10.909 s) : 0, 10908637
Agent [candidate] (1.152 s) : 0, 1152496
Total [candidate] (11.051 s) : 0, 11050548
section profiling
Agent [baseline] (1.15 s) : 0, 1150444
Total [baseline] (11.061 s) : 0, 11061478
Agent [candidate] (1.167 s) : 0, 1167284
Total [candidate] (11.034 s) : 0, 11033932
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.003 s -
Agent appsec 1.191 s 187.94 ms (18.7%)
Agent iast 1.144 s 141.123 ms (14.1%)
Agent profiling 1.15 s 147.113 ms (14.7%)
Total tracing 10.648 s -
Total appsec 11.005 s 357.751 ms (3.4%)
Total iast 10.909 s 260.999 ms (2.5%)
Total profiling 11.061 s 413.84 ms (3.9%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.025 s -
Agent appsec 1.202 s 177.034 ms (17.3%)
Agent iast 1.152 s 127.322 ms (12.4%)
Agent profiling 1.167 s 142.11 ms (13.9%)
Total tracing 10.708 s -
Total appsec 10.885 s 177.088 ms (1.7%)
Total iast 11.051 s 342.55 ms (3.2%)
Total profiling 11.034 s 325.934 ms (3.0%)
gantt
    title petclinic - break down per module: candidate=1.54.0-SNAPSHOT~b24605d047, baseline=1.54.0-SNAPSHOT~0094a60a80

    dateFormat X
    axisFormat %s
section tracing
crashtracking [baseline] (1.453 ms) : 0, 1453
crashtracking [candidate] (1.457 ms) : 0, 1457
BytebuddyAgent [baseline] (686.422 ms) : 0, 686422
BytebuddyAgent [candidate] (692.069 ms) : 0, 692069
GlobalTracer [baseline] (247.465 ms) : 0, 247465
GlobalTracer [candidate] (259.034 ms) : 0, 259034
AppSec [baseline] (30.967 ms) : 0, 30967
AppSec [candidate] (31.928 ms) : 0, 31928
Debugger [baseline] (6.286 ms) : 0, 6286
Debugger [candidate] (6.399 ms) : 0, 6399
Remote Config [baseline] (680.476 µs) : 0, 680
Remote Config [candidate] (687.131 µs) : 0, 687
Telemetry [baseline] (8.994 ms) : 0, 8994
Telemetry [candidate] (12.464 ms) : 0, 12464
section appsec
crashtracking [baseline] (1.464 ms) : 0, 1464
crashtracking [candidate] (1.448 ms) : 0, 1448
BytebuddyAgent [baseline] (715.249 ms) : 0, 715249
BytebuddyAgent [candidate] (715.312 ms) : 0, 715312
GlobalTracer [baseline] (240.602 ms) : 0, 240602
GlobalTracer [candidate] (250.894 ms) : 0, 250894
AppSec [baseline] (172.653 ms) : 0, 172653
AppSec [candidate] (172.189 ms) : 0, 172189
Debugger [baseline] (5.971 ms) : 0, 5971
Debugger [candidate] (6.12 ms) : 0, 6120
Remote Config [baseline] (673.119 µs) : 0, 673
Remote Config [candidate] (617.34 µs) : 0, 617
Telemetry [baseline] (8.36 ms) : 0, 8360
Telemetry [candidate] (9.158 ms) : 0, 9158
IAST [baseline] (25.11 ms) : 0, 25110
IAST [candidate] (25.312 ms) : 0, 25312
section iast
crashtracking [baseline] (1.454 ms) : 0, 1454
crashtracking [candidate] (1.45 ms) : 0, 1450
BytebuddyAgent [baseline] (808.601 ms) : 0, 808601
BytebuddyAgent [candidate] (808.459 ms) : 0, 808459
GlobalTracer [baseline] (238.131 ms) : 0, 238131
GlobalTracer [candidate] (247.424 ms) : 0, 247424
AppSec [baseline] (33.495 ms) : 0, 33495
AppSec [candidate] (28.201 ms) : 0, 28201
Debugger [baseline] (6.158 ms) : 0, 6158
Debugger [candidate] (6.181 ms) : 0, 6181
Remote Config [baseline] (609.829 µs) : 0, 610
Remote Config [candidate] (590.048 µs) : 0, 590
Telemetry [baseline] (8.328 ms) : 0, 8328
Telemetry [candidate] (8.299 ms) : 0, 8299
IAST [baseline] (26.47 ms) : 0, 26470
IAST [candidate] (30.952 ms) : 0, 30952
section profiling
ProfilingAgent [baseline] (101.07 ms) : 0, 101070
ProfilingAgent [candidate] (101.209 ms) : 0, 101209
crashtracking [baseline] (1.46 ms) : 0, 1460
crashtracking [candidate] (1.439 ms) : 0, 1439
BytebuddyAgent [baseline] (717.719 ms) : 0, 717719
BytebuddyAgent [candidate] (722.961 ms) : 0, 722961
GlobalTracer [baseline] (223.92 ms) : 0, 223920
GlobalTracer [candidate] (235.337 ms) : 0, 235337
AppSec [baseline] (31.356 ms) : 0, 31356
AppSec [candidate] (31.252 ms) : 0, 31252
Debugger [baseline] (7.211 ms) : 0, 7211
Debugger [candidate] (6.515 ms) : 0, 6515
Remote Config [baseline] (689.485 µs) : 0, 689
Remote Config [candidate] (736.759 µs) : 0, 737
Telemetry [baseline] (16.024 ms) : 0, 16024
Telemetry [candidate] (16.524 ms) : 0, 16524
Profiling [baseline] (101.67 ms) : 0, 101670
Profiling [candidate] (101.787 ms) : 0, 101787
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master jpbempel/deejgregor-debugger-java-5-classes
git_commit_date 1758615873 1758631652
git_commit_sha 0094a60 b24605d
release_version 1.54.0-SNAPSHOT~0094a60a80 1.54.0-SNAPSHOT~b24605d047
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1758633232 1758633232
ci_job_id 1142996298 1142996298
ci_pipeline_id 77273236 77273236
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-0-u7g60yjs 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-0-u7g60yjs 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Summary

Found 3 performance improvements and 3 performance regressions! Performance is the same for 6 metrics, 12 unstable metrics.

scenario Δ mean http_req_duration Δ mean throughput candidate mean http_req_duration candidate mean throughput baseline mean http_req_duration baseline mean throughput
scenario:load:insecure-bank:tracing:high_load worse
[+261.616µs; +509.621µs] or [+3.502%; +6.822%]
unstable
[-107.052op/s; +46.864op/s] or [-17.273%; +7.561%]
7.856ms 589.688op/s 7.471ms 619.781op/s
scenario:load:insecure-bank:profiling:high_load worse
[+533.124µs; +839.834µs] or [+6.145%; +9.680%]
unstable
[-106.440op/s; +29.190op/s] or [-19.905%; +5.459%]
9.362ms 496.125op/s 8.676ms 534.750op/s
scenario:load:insecure-bank:iast:high_load better
[-994.441µs; -627.911µs] or [-9.515%; -6.008%]
unstable
[-19.717op/s; +93.780op/s] or [-4.432%; +21.081%]
9.640ms 481.875op/s 10.451ms 444.844op/s
scenario:load:petclinic:no_agent:high_load worse
[+1.315ms; +1.939ms] or [+3.693%; +5.448%]
unstable
[-14.458op/s; +3.008op/s] or [-11.004%; +2.289%]
37.224ms 125.662op/s 35.597ms 131.387op/s
scenario:load:petclinic:appsec:high_load better
[-2.162ms; -1.258ms] or [-4.427%; -2.576%]
unstable
[-3.223op/s; +10.198op/s] or [-3.364%; +10.643%]
47.134ms 99.312op/s 48.844ms 95.825op/s
scenario:load:petclinic:tracing:high_load better
[-3.115ms; -2.295ms] or [-6.937%; -5.111%]
unstable
[-1.719op/s; +12.406op/s] or [-1.629%; +11.757%]
42.196ms 110.862op/s 44.901ms 105.519op/s
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.54.0-SNAPSHOT~b24605d047, baseline=1.54.0-SNAPSHOT~0094a60a80
    dateFormat X
    axisFormat %s
section baseline
no_agent (35.597 ms) : 35312, 35882
.   : milestone, 35597,
appsec (48.844 ms) : 48413, 49275
.   : milestone, 48844,
code_origins (44.646 ms) : 44268, 45024
.   : milestone, 44646,
iast (45.031 ms) : 44633, 45428
.   : milestone, 45031,
profiling (47.789 ms) : 47323, 48254
.   : milestone, 47789,
tracing (44.901 ms) : 44500, 45303
.   : milestone, 44901,
section candidate
no_agent (37.224 ms) : 36929, 37519
.   : milestone, 37224,
appsec (47.134 ms) : 46725, 47543
.   : milestone, 47134,
code_origins (44.583 ms) : 44204, 44963
.   : milestone, 44583,
iast (45.821 ms) : 45416, 46225
.   : milestone, 45821,
profiling (48.517 ms) : 48052, 48981
.   : milestone, 48517,
tracing (42.196 ms) : 41837, 42555
.   : milestone, 42196,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 35.597 ms [35.312 ms, 35.882 ms] -
appsec 48.844 ms [48.413 ms, 49.275 ms] 13.247 ms (37.2%)
code_origins 44.646 ms [44.268 ms, 45.024 ms] 9.048 ms (25.4%)
iast 45.031 ms [44.633 ms, 45.428 ms] 9.433 ms (26.5%)
profiling 47.789 ms [47.323 ms, 48.254 ms] 12.191 ms (34.2%)
tracing 44.901 ms [44.5 ms, 45.303 ms] 9.304 ms (26.1%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 37.224 ms [36.929 ms, 37.519 ms] -
appsec 47.134 ms [46.725 ms, 47.543 ms] 9.909 ms (26.6%)
code_origins 44.583 ms [44.204 ms, 44.963 ms] 7.359 ms (19.8%)
iast 45.821 ms [45.416 ms, 46.225 ms] 8.596 ms (23.1%)
profiling 48.517 ms [48.052 ms, 48.981 ms] 11.292 ms (30.3%)
tracing 42.196 ms [41.837 ms, 42.555 ms] 4.972 ms (13.4%)
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.54.0-SNAPSHOT~b24605d047, baseline=1.54.0-SNAPSHOT~0094a60a80
    dateFormat X
    axisFormat %s
section baseline
no_agent (4.401 ms) : 4349, 4453
.   : milestone, 4401,
iast (10.451 ms) : 10272, 10631
.   : milestone, 10451,
iast_FULL (13.956 ms) : 13670, 14242
.   : milestone, 13956,
iast_GLOBAL (10.463 ms) : 10279, 10648
.   : milestone, 10463,
profiling (8.676 ms) : 8541, 8811
.   : milestone, 8676,
tracing (7.471 ms) : 7360, 7581
.   : milestone, 7471,
section candidate
no_agent (4.352 ms) : 4303, 4401
.   : milestone, 4352,
iast (9.64 ms) : 9480, 9800
.   : milestone, 9640,
iast_FULL (13.892 ms) : 13615, 14168
.   : milestone, 13892,
iast_GLOBAL (10.434 ms) : 10249, 10618
.   : milestone, 10434,
profiling (9.362 ms) : 9213, 9512
.   : milestone, 9362,
tracing (7.856 ms) : 7737, 7976
.   : milestone, 7856,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 4.401 ms [4.349 ms, 4.453 ms] -
iast 10.451 ms [10.272 ms, 10.631 ms] 6.051 ms (137.5%)
iast_FULL 13.956 ms [13.67 ms, 14.242 ms] 9.555 ms (217.1%)
iast_GLOBAL 10.463 ms [10.279 ms, 10.648 ms] 6.063 ms (137.8%)
profiling 8.676 ms [8.541 ms, 8.811 ms] 4.275 ms (97.1%)
tracing 7.471 ms [7.36 ms, 7.581 ms] 3.07 ms (69.8%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 4.352 ms [4.303 ms, 4.401 ms] -
iast 9.64 ms [9.48 ms, 9.8 ms] 5.288 ms (121.5%)
iast_FULL 13.892 ms [13.615 ms, 14.168 ms] 9.54 ms (219.2%)
iast_GLOBAL 10.434 ms [10.249 ms, 10.618 ms] 6.082 ms (139.7%)
profiling 9.362 ms [9.213 ms, 9.512 ms] 5.01 ms (115.1%)
tracing 7.856 ms [7.737 ms, 7.976 ms] 3.504 ms (80.5%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master jpbempel/deejgregor-debugger-java-5-classes
git_commit_date 1758615873 1758631652
git_commit_sha 0094a60 b24605d
release_version 1.54.0-SNAPSHOT~0094a60a80 1.54.0-SNAPSHOT~b24605d047
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1758633774 1758633774
ci_job_id 1142996299 1142996299
ci_pipeline_id 77273236 77273236
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-1-z2lkpvov 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-1-z2lkpvov 6.8.0-1031-aws #33~22.04.1-Ubuntu SMP Thu Jun 26 14:22:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 10 metrics, 2 unstable metrics.

Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.54.0-SNAPSHOT~b24605d047, baseline=1.54.0-SNAPSHOT~0094a60a80
    dateFormat X
    axisFormat %s
section baseline
no_agent (14.917 s) : 14917000, 14917000
.   : milestone, 14917000,
appsec (15.089 s) : 15089000, 15089000
.   : milestone, 15089000,
iast (18.705 s) : 18705000, 18705000
.   : milestone, 18705000,
iast_GLOBAL (18.249 s) : 18249000, 18249000
.   : milestone, 18249000,
profiling (15.548 s) : 15548000, 15548000
.   : milestone, 15548000,
tracing (15.085 s) : 15085000, 15085000
.   : milestone, 15085000,
section candidate
no_agent (15.519 s) : 15519000, 15519000
.   : milestone, 15519000,
appsec (15.193 s) : 15193000, 15193000
.   : milestone, 15193000,
iast (18.783 s) : 18783000, 18783000
.   : milestone, 18783000,
iast_GLOBAL (17.946 s) : 17946000, 17946000
.   : milestone, 17946000,
profiling (15.529 s) : 15529000, 15529000
.   : milestone, 15529000,
tracing (15.021 s) : 15021000, 15021000
.   : milestone, 15021000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.917 s [14.917 s, 14.917 s] -
appsec 15.089 s [15.089 s, 15.089 s] 172.0 ms (1.2%)
iast 18.705 s [18.705 s, 18.705 s] 3.788 s (25.4%)
iast_GLOBAL 18.249 s [18.249 s, 18.249 s] 3.332 s (22.3%)
profiling 15.548 s [15.548 s, 15.548 s] 631.0 ms (4.2%)
tracing 15.085 s [15.085 s, 15.085 s] 168.0 ms (1.1%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.519 s [15.519 s, 15.519 s] -
appsec 15.193 s [15.193 s, 15.193 s] -326.0 ms (-2.1%)
iast 18.783 s [18.783 s, 18.783 s] 3.264 s (21.0%)
iast_GLOBAL 17.946 s [17.946 s, 17.946 s] 2.427 s (15.6%)
profiling 15.529 s [15.529 s, 15.529 s] 10.0 ms (0.1%)
tracing 15.021 s [15.021 s, 15.021 s] -498.0 ms (-3.2%)
Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.54.0-SNAPSHOT~b24605d047, baseline=1.54.0-SNAPSHOT~0094a60a80
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.472 ms) : 1461, 1484
.   : milestone, 1472,
appsec (3.694 ms) : 3475, 3912
.   : milestone, 3694,
iast (2.201 ms) : 2138, 2264
.   : milestone, 2201,
iast_GLOBAL (2.251 ms) : 2187, 2314
.   : milestone, 2251,
profiling (2.079 ms) : 2026, 2131
.   : milestone, 2079,
tracing (2.03 ms) : 1981, 2079
.   : milestone, 2030,
section candidate
no_agent (1.481 ms) : 1470, 1493
.   : milestone, 1481,
appsec (3.705 ms) : 3485, 3924
.   : milestone, 3705,
iast (2.2 ms) : 2137, 2262
.   : milestone, 2200,
iast_GLOBAL (2.239 ms) : 2177, 2302
.   : milestone, 2239,
profiling (2.46 ms) : 2307, 2614
.   : milestone, 2460,
tracing (2.024 ms) : 1975, 2073
.   : milestone, 2024,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.472 ms [1.461 ms, 1.484 ms] -
appsec 3.694 ms [3.475 ms, 3.912 ms] 2.221 ms (150.9%)
iast 2.201 ms [2.138 ms, 2.264 ms] 728.781 µs (49.5%)
iast_GLOBAL 2.251 ms [2.187 ms, 2.314 ms] 778.393 µs (52.9%)
profiling 2.079 ms [2.026 ms, 2.131 ms] 606.603 µs (41.2%)
tracing 2.03 ms [1.981 ms, 2.079 ms] 557.823 µs (37.9%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.481 ms [1.47 ms, 1.493 ms] -
appsec 3.705 ms [3.485 ms, 3.924 ms] 2.223 ms (150.1%)
iast 2.2 ms [2.137 ms, 2.262 ms] 718.744 µs (48.5%)
iast_GLOBAL 2.239 ms [2.177 ms, 2.302 ms] 758.266 µs (51.2%)
profiling 2.46 ms [2.307 ms, 2.614 ms] 978.983 µs (66.1%)
tracing 2.024 ms [1.975 ms, 2.073 ms] 542.923 µs (36.7%)

deejgregor and others added 2 commits September 23, 2025 14:42
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.
@jpbempel jpbempel force-pushed the jpbempel/deejgregor-debugger-java-5-classes branch from 6b87a68 to b24605d Compare September 23, 2025 12:49
@jpbempel jpbempel merged commit 6ee44dd into master Sep 23, 2025
552 checks passed
@jpbempel jpbempel deleted the jpbempel/deejgregor-debugger-java-5-classes branch September 23, 2025 13:55
@github-actions github-actions bot added this to the 1.54.0 milestone Sep 23, 2025
mhlidd pushed a commit that referenced this pull request Sep 24, 2025
Allow pre-Java 6 classes to be transformed in the debugger

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.
---------

Co-authored-by: DJ Gregor <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: debugger Dynamic Instrumentation tag: community Community contribution type: bug Bug report and fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants