-
Notifications
You must be signed in to change notification settings - Fork 324
Add support of Kotlin's SourceDebugExtension #10448
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
base: master
Are you sure you want to change the base?
Conversation
|
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 0 performance regressions! Performance is the same for 9 metrics, 6 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 (312.603 µs) : 278, 347
. : milestone, 313,
basic (271.977 µs) : 265, 279
. : milestone, 272,
loop (8.958 ms) : 8953, 8963
. : milestone, 8958,
section candidate
noprobe (324.344 µs) : 280, 368
. : milestone, 324,
basic (277.941 µs) : 271, 285
. : milestone, 278,
loop (8.968 ms) : 8963, 8972
. : milestone, 8968,
|
In Kotlin some constructions remap source line beyond of the end of file (ex: stream operations, ...) which leads to incorrect line numbering in SymDB. The Kotlin classfiles contains information about this line remapping using the SourceDebugExtension (JSR-45). We are leveraging this extension to remap correctly the line numbers and send corrected lines to SymDB. We are introducing a SourceRemapper interface with one implementation for Kotlin for now, but keeping open door for other languages like Scala.
f5b7f92 to
aff1e5e
Compare
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 62 metrics, 9 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.59.0-SNAPSHOT~aff1e5ec635, baseline=1.59.0-SNAPSHOT~5a54a81cb0
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.058 s) : 0, 1058181
Total [baseline] (10.934 s) : 0, 10934142
Agent [candidate] (1.06 s) : 0, 1060345
Total [candidate] (10.936 s) : 0, 10935708
section appsec
Agent [baseline] (1.234 s) : 0, 1234361
Total [baseline] (11.014 s) : 0, 11014232
Agent [candidate] (1.228 s) : 0, 1227672
Total [candidate] (11.006 s) : 0, 11005527
section iast
Agent [baseline] (1.225 s) : 0, 1225216
Total [baseline] (11.107 s) : 0, 11106659
Agent [candidate] (1.238 s) : 0, 1238199
Total [candidate] (11.089 s) : 0, 11089061
section profiling
Agent [baseline] (1.188 s) : 0, 1188500
Total [baseline] (10.963 s) : 0, 10962658
Agent [candidate] (1.184 s) : 0, 1183658
Total [candidate] (10.803 s) : 0, 10802768
gantt
title petclinic - break down per module: candidate=1.59.0-SNAPSHOT~aff1e5ec635, baseline=1.59.0-SNAPSHOT~5a54a81cb0
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.186 ms) : 0, 1186
crashtracking [candidate] (1.174 ms) : 0, 1174
BytebuddyAgent [baseline] (622.416 ms) : 0, 622416
BytebuddyAgent [candidate] (623.275 ms) : 0, 623275
AgentMeter [baseline] (28.741 ms) : 0, 28741
AgentMeter [candidate] (28.722 ms) : 0, 28722
GlobalTracer [baseline] (257.578 ms) : 0, 257578
GlobalTracer [candidate] (257.173 ms) : 0, 257173
AppSec [baseline] (32.978 ms) : 0, 32978
AppSec [candidate] (32.989 ms) : 0, 32989
Debugger [baseline] (61.089 ms) : 0, 61089
Debugger [candidate] (61.912 ms) : 0, 61912
Remote Config [baseline] (630.77 µs) : 0, 631
Remote Config [candidate] (622.566 µs) : 0, 623
Telemetry [baseline] (12.177 ms) : 0, 12177
Telemetry [candidate] (9.953 ms) : 0, 9953
Flare Poller [baseline] (6.126 ms) : 0, 6126
Flare Poller [candidate] (9.191 ms) : 0, 9191
section appsec
crashtracking [baseline] (1.177 ms) : 0, 1177
crashtracking [candidate] (1.167 ms) : 0, 1167
BytebuddyAgent [baseline] (653.69 ms) : 0, 653690
BytebuddyAgent [candidate] (650.0 ms) : 0, 650000
AgentMeter [baseline] (11.874 ms) : 0, 11874
AgentMeter [candidate] (11.746 ms) : 0, 11746
GlobalTracer [baseline] (257.929 ms) : 0, 257929
GlobalTracer [candidate] (256.211 ms) : 0, 256211
IAST [baseline] (25.502 ms) : 0, 25502
IAST [candidate] (25.513 ms) : 0, 25513
AppSec [baseline] (168.042 ms) : 0, 168042
AppSec [candidate] (167.137 ms) : 0, 167137
Debugger [baseline] (67.389 ms) : 0, 67389
Debugger [candidate] (67.129 ms) : 0, 67129
Remote Config [baseline] (660.009 µs) : 0, 660
Remote Config [candidate] (685.535 µs) : 0, 686
Telemetry [baseline] (9.135 ms) : 0, 9135
Telemetry [candidate] (9.288 ms) : 0, 9288
Flare Poller [baseline] (3.622 ms) : 0, 3622
Flare Poller [candidate] (3.64 ms) : 0, 3640
section iast
crashtracking [baseline] (1.204 ms) : 0, 1204
crashtracking [candidate] (1.206 ms) : 0, 1206
BytebuddyAgent [baseline] (789.825 ms) : 0, 789825
BytebuddyAgent [candidate] (798.218 ms) : 0, 798218
AgentMeter [baseline] (11.136 ms) : 0, 11136
AgentMeter [candidate] (11.412 ms) : 0, 11412
GlobalTracer [baseline] (247.878 ms) : 0, 247878
GlobalTracer [candidate] (249.844 ms) : 0, 249844
IAST [baseline] (26.973 ms) : 0, 26973
IAST [candidate] (27.097 ms) : 0, 27097
AppSec [baseline] (33.423 ms) : 0, 33423
AppSec [candidate] (31.688 ms) : 0, 31688
Debugger [baseline] (66.9 ms) : 0, 66900
Debugger [candidate] (70.548 ms) : 0, 70548
Remote Config [baseline] (559.641 µs) : 0, 560
Remote Config [candidate] (557.275 µs) : 0, 557
Telemetry [baseline] (8.509 ms) : 0, 8509
Telemetry [candidate] (8.594 ms) : 0, 8594
Flare Poller [baseline] (3.46 ms) : 0, 3460
Flare Poller [candidate] (3.446 ms) : 0, 3446
section profiling
crashtracking [baseline] (1.229 ms) : 0, 1229
crashtracking [candidate] (1.202 ms) : 0, 1202
BytebuddyAgent [baseline] (680.187 ms) : 0, 680187
BytebuddyAgent [candidate] (675.73 ms) : 0, 675730
AgentMeter [baseline] (8.65 ms) : 0, 8650
AgentMeter [candidate] (8.649 ms) : 0, 8649
GlobalTracer [baseline] (216.812 ms) : 0, 216812
GlobalTracer [candidate] (216.053 ms) : 0, 216053
AppSec [baseline] (32.099 ms) : 0, 32099
AppSec [candidate] (32.365 ms) : 0, 32365
Debugger [baseline] (67.44 ms) : 0, 67440
Debugger [candidate] (67.742 ms) : 0, 67742
Remote Config [baseline] (592.051 µs) : 0, 592
Remote Config [candidate] (589.173 µs) : 0, 589
Telemetry [baseline] (8.611 ms) : 0, 8611
Telemetry [candidate] (8.642 ms) : 0, 8642
Flare Poller [baseline] (3.706 ms) : 0, 3706
Flare Poller [candidate] (3.767 ms) : 0, 3767
ProfilingAgent [baseline] (99.139 ms) : 0, 99139
ProfilingAgent [candidate] (99.246 ms) : 0, 99246
Profiling [baseline] (99.708 ms) : 0, 99708
Profiling [candidate] (99.808 ms) : 0, 99808
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.59.0-SNAPSHOT~aff1e5ec635, baseline=1.59.0-SNAPSHOT~5a54a81cb0
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.057 s) : 0, 1056833
Total [baseline] (8.701 s) : 0, 8701472
Agent [candidate] (1.059 s) : 0, 1058518
Total [candidate] (8.705 s) : 0, 8704843
section iast
Agent [baseline] (1.225 s) : 0, 1225171
Total [baseline] (9.402 s) : 0, 9401982
Agent [candidate] (1.224 s) : 0, 1223652
Total [candidate] (9.384 s) : 0, 9383990
gantt
title insecure-bank - break down per module: candidate=1.59.0-SNAPSHOT~aff1e5ec635, baseline=1.59.0-SNAPSHOT~5a54a81cb0
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.179 ms) : 0, 1179
crashtracking [candidate] (1.169 ms) : 0, 1169
BytebuddyAgent [baseline] (623.188 ms) : 0, 623188
BytebuddyAgent [candidate] (622.713 ms) : 0, 622713
AgentMeter [baseline] (28.837 ms) : 0, 28837
AgentMeter [candidate] (28.802 ms) : 0, 28802
GlobalTracer [baseline] (257.145 ms) : 0, 257145
GlobalTracer [candidate] (257.667 ms) : 0, 257667
AppSec [baseline] (32.849 ms) : 0, 32849
AppSec [candidate] (33.073 ms) : 0, 33073
Debugger [baseline] (62.493 ms) : 0, 62493
Debugger [candidate] (60.628 ms) : 0, 60628
Remote Config [baseline] (614.626 µs) : 0, 615
Remote Config [candidate] (646.254 µs) : 0, 646
Telemetry [baseline] (9.829 ms) : 0, 9829
Telemetry [candidate] (9.902 ms) : 0, 9902
Flare Poller [baseline] (5.226 ms) : 0, 5226
Flare Poller [candidate] (8.472 ms) : 0, 8472
section iast
crashtracking [baseline] (1.179 ms) : 0, 1179
crashtracking [candidate] (1.182 ms) : 0, 1182
BytebuddyAgent [baseline] (790.241 ms) : 0, 790241
BytebuddyAgent [candidate] (789.104 ms) : 0, 789104
AgentMeter [baseline] (11.15 ms) : 0, 11150
AgentMeter [candidate] (11.142 ms) : 0, 11142
GlobalTracer [baseline] (248.284 ms) : 0, 248284
GlobalTracer [candidate] (247.813 ms) : 0, 247813
IAST [baseline] (26.801 ms) : 0, 26801
IAST [candidate] (26.868 ms) : 0, 26868
AppSec [baseline] (32.034 ms) : 0, 32034
AppSec [candidate] (30.426 ms) : 0, 30426
Debugger [baseline] (67.535 ms) : 0, 67535
Debugger [candidate] (69.363 ms) : 0, 69363
Remote Config [baseline] (552.405 µs) : 0, 552
Remote Config [candidate] (540.481 µs) : 0, 540
Telemetry [baseline] (8.524 ms) : 0, 8524
Telemetry [candidate] (8.491 ms) : 0, 8491
Flare Poller [baseline] (3.485 ms) : 0, 3485
Flare Poller [candidate] (3.5 ms) : 0, 3500
LoadParameters
See matching parameters
SummaryFound 3 performance improvements and 1 performance regressions! Performance is the same for 16 metrics, 16 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.59.0-SNAPSHOT~aff1e5ec635, baseline=1.59.0-SNAPSHOT~5a54a81cb0
dateFormat X
axisFormat %s
section baseline
no_agent (1.189 ms) : 1178, 1201
. : milestone, 1189,
iast (3.337 ms) : 3298, 3377
. : milestone, 3337,
iast_FULL (5.994 ms) : 5933, 6056
. : milestone, 5994,
iast_GLOBAL (3.668 ms) : 3607, 3729
. : milestone, 3668,
profiling (2.101 ms) : 2082, 2120
. : milestone, 2101,
tracing (1.821 ms) : 1805, 1838
. : milestone, 1821,
section candidate
no_agent (1.178 ms) : 1167, 1190
. : milestone, 1178,
iast (3.228 ms) : 3188, 3268
. : milestone, 3228,
iast_FULL (5.65 ms) : 5595, 5706
. : milestone, 5650,
iast_GLOBAL (3.458 ms) : 3410, 3506
. : milestone, 3458,
profiling (1.929 ms) : 1913, 1945
. : milestone, 1929,
tracing (1.788 ms) : 1774, 1803
. : milestone, 1788,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.59.0-SNAPSHOT~aff1e5ec635, baseline=1.59.0-SNAPSHOT~5a54a81cb0
dateFormat X
axisFormat %s
section baseline
no_agent (17.84 ms) : 17658, 18022
. : milestone, 17840,
appsec (18.341 ms) : 18152, 18529
. : milestone, 18341,
code_origins (17.98 ms) : 17798, 18161
. : milestone, 17980,
iast (17.741 ms) : 17564, 17918
. : milestone, 17741,
profiling (18.322 ms) : 18143, 18501
. : milestone, 18322,
tracing (17.815 ms) : 17637, 17994
. : milestone, 17815,
section candidate
no_agent (19.149 ms) : 18947, 19352
. : milestone, 19149,
appsec (18.444 ms) : 18259, 18630
. : milestone, 18444,
code_origins (17.709 ms) : 17533, 17884
. : milestone, 17709,
iast (17.399 ms) : 17226, 17571
. : milestone, 17399,
profiling (18.419 ms) : 18230, 18608
. : milestone, 18419,
tracing (17.432 ms) : 17258, 17605
. : milestone, 17432,
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 tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.59.0-SNAPSHOT~aff1e5ec635, baseline=1.59.0-SNAPSHOT~5a54a81cb0
dateFormat X
axisFormat %s
section baseline
no_agent (1.474 ms) : 1463, 1486
. : milestone, 1474,
appsec (3.756 ms) : 3533, 3978
. : milestone, 3756,
iast (2.25 ms) : 2181, 2319
. : milestone, 2250,
iast_GLOBAL (2.301 ms) : 2232, 2371
. : milestone, 2301,
profiling (2.075 ms) : 2020, 2130
. : milestone, 2075,
tracing (2.08 ms) : 2026, 2134
. : milestone, 2080,
section candidate
no_agent (1.47 ms) : 1458, 1481
. : milestone, 1470,
appsec (3.739 ms) : 3518, 3961
. : milestone, 3739,
iast (2.256 ms) : 2186, 2325
. : milestone, 2256,
iast_GLOBAL (2.302 ms) : 2232, 2372
. : milestone, 2302,
profiling (2.106 ms) : 2049, 2163
. : milestone, 2106,
tracing (2.064 ms) : 2010, 2118
. : milestone, 2064,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.59.0-SNAPSHOT~aff1e5ec635, baseline=1.59.0-SNAPSHOT~5a54a81cb0
dateFormat X
axisFormat %s
section baseline
no_agent (14.896 s) : 14896000, 14896000
. : milestone, 14896000,
appsec (15.004 s) : 15004000, 15004000
. : milestone, 15004000,
iast (18.168 s) : 18168000, 18168000
. : milestone, 18168000,
iast_GLOBAL (17.975 s) : 17975000, 17975000
. : milestone, 17975000,
profiling (15.401 s) : 15401000, 15401000
. : milestone, 15401000,
tracing (14.616 s) : 14616000, 14616000
. : milestone, 14616000,
section candidate
no_agent (15.44 s) : 15440000, 15440000
. : milestone, 15440000,
appsec (14.88 s) : 14880000, 14880000
. : milestone, 14880000,
iast (17.75 s) : 17750000, 17750000
. : milestone, 17750000,
iast_GLOBAL (17.834 s) : 17834000, 17834000
. : milestone, 17834000,
profiling (14.772 s) : 14772000, 14772000
. : milestone, 14772000,
tracing (14.877 s) : 14877000, 14877000
. : milestone, 14877000,
|
| import com.datadog.debugger.probe.Where; | ||
| import com.datadog.debugger.sink.Snapshot; | ||
| import com.datadog.debugger.util.ClassFileLines; | ||
| import com.datadog.debugger.util.JvmLanguage; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
odd that this is the sole change in this file...
ojung
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
What Does This Do
In Kotlin some constructions remap source line beyond of the end of file (ex: stream operations, ...) which leads to incorrect line numbering in SymDB. The Kotlin classfiles contains information about this line remapping using the SourceDebugExtension (JSR-45). We are leveraging this extension to remap correctly the line numbers and send corrected lines to SymDB.
We are introducing a SourceRemapper interface with one implementation for Kotlin for now, but keeping open door for other languages like Scala.
Motivation
Additional Notes
Related to #10385
Contributor Checklist
type:and (comp:orinst:) labels in addition to any useful labelsclose,fixor any linking keywords when referencing an issue.Use
solvesinstead, and assign the PR milestone to the issueJira ticket: DEBUG-4911