-
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
Fix hoisting local vars for Kotlin code #7758
Conversation
javac begins the range of a local var in the LocalVariableTable just after the store instruction at the init. kotlinc is more free to instroduce nop/other instructions in-between. need to scan backward from the start of the range to find the last store of this slot to begin the rewrite of the slot needed to hoist correctly local vars.
Debugger benchmarksParameters
See matching parameters
SummaryFound 5 performance improvements and 3 performance regressions! Performance is the same for 1 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 (301.993 µs) : 268, 336
. : milestone, 302,
basic (300.056 µs) : 292, 309
. : milestone, 300,
loop (11.019 ms) : 10984, 11054
. : milestone, 11019,
section candidate
noprobe (307.745 µs) : 269, 347
. : milestone, 308,
basic (345.745 µs) : 338, 353
. : milestone, 346,
loop (10.326 ms) : 10288, 10364
. : milestone, 10326,
|
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 54 metrics, 9 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.41.0-SNAPSHOT~96c6f534f8, baseline=1.41.0-SNAPSHOT~eadf0cc0d6
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.067 s) : 0, 1066826
Total [baseline] (8.556 s) : 0, 8555939
Agent [candidate] (1.066 s) : 0, 1066075
Total [candidate] (8.561 s) : 0, 8560673
section iast
Agent [baseline] (1.2 s) : 0, 1199729
Total [baseline] (9.076 s) : 0, 9076314
Agent [candidate] (1.194 s) : 0, 1194380
Total [candidate] (9.079 s) : 0, 9079076
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.198 s) : 0, 1197856
Total [baseline] (9.123 s) : 0, 9123469
Agent [candidate] (1.205 s) : 0, 1204935
Total [candidate] (9.09 s) : 0, 9090352
section iast_TELEMETRY_OFF
Agent [baseline] (1.192 s) : 0, 1191883
Total [baseline] (9.077 s) : 0, 9076867
Agent [candidate] (1.191 s) : 0, 1190516
Total [candidate] (9.048 s) : 0, 9047513
gantt
title insecure-bank - break down per module: candidate=1.41.0-SNAPSHOT~96c6f534f8, baseline=1.41.0-SNAPSHOT~eadf0cc0d6
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (681.631 ms) : 0, 681631
BytebuddyAgent [candidate] (681.0 ms) : 0, 681000
GlobalTracer [baseline] (309.795 ms) : 0, 309795
GlobalTracer [candidate] (309.695 ms) : 0, 309695
AppSec [baseline] (53.479 ms) : 0, 53479
AppSec [candidate] (53.519 ms) : 0, 53519
Remote Config [baseline] (651.259 µs) : 0, 651
Remote Config [candidate] (657.393 µs) : 0, 657
Telemetry [baseline] (7.608 ms) : 0, 7608
Telemetry [candidate] (7.518 ms) : 0, 7518
section iast
BytebuddyAgent [baseline] (801.845 ms) : 0, 801845
BytebuddyAgent [candidate] (796.458 ms) : 0, 796458
GlobalTracer [baseline] (298.5 ms) : 0, 298500
GlobalTracer [candidate] (298.48 ms) : 0, 298480
AppSec [baseline] (54.559 ms) : 0, 54559
AppSec [candidate] (56.844 ms) : 0, 56844
IAST [baseline] (23.484 ms) : 0, 23484
IAST [candidate] (21.214 ms) : 0, 21214
Remote Config [baseline] (608.788 µs) : 0, 609
Remote Config [candidate] (607.275 µs) : 0, 607
Telemetry [baseline] (7.012 ms) : 0, 7012
Telemetry [candidate] (7.074 ms) : 0, 7074
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (797.048 ms) : 0, 797048
BytebuddyAgent [candidate] (803.114 ms) : 0, 803114
GlobalTracer [baseline] (300.643 ms) : 0, 300643
GlobalTracer [candidate] (301.457 ms) : 0, 301457
AppSec [baseline] (54.109 ms) : 0, 54109
AppSec [candidate] (54.957 ms) : 0, 54957
IAST [baseline] (24.648 ms) : 0, 24648
IAST [candidate] (23.842 ms) : 0, 23842
Remote Config [baseline] (606.818 µs) : 0, 607
Remote Config [candidate] (618.893 µs) : 0, 619
Telemetry [baseline] (7.103 ms) : 0, 7103
Telemetry [candidate] (7.129 ms) : 0, 7129
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (793.611 ms) : 0, 793611
BytebuddyAgent [candidate] (792.884 ms) : 0, 792884
GlobalTracer [baseline] (298.959 ms) : 0, 298959
GlobalTracer [candidate] (298.752 ms) : 0, 298752
AppSec [baseline] (56.222 ms) : 0, 56222
AppSec [candidate] (54.436 ms) : 0, 54436
IAST [baseline] (21.774 ms) : 0, 21774
IAST [candidate] (23.172 ms) : 0, 23172
Remote Config [baseline] (618.599 µs) : 0, 619
Remote Config [candidate] (614.958 µs) : 0, 615
Telemetry [baseline] (7.006 ms) : 0, 7006
Telemetry [candidate] (6.959 ms) : 0, 6959
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.41.0-SNAPSHOT~96c6f534f8, baseline=1.41.0-SNAPSHOT~eadf0cc0d6
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.068 s) : 0, 1067655
Total [baseline] (10.415 s) : 0, 10415132
Agent [candidate] (1.078 s) : 0, 1077994
Total [candidate] (10.437 s) : 0, 10436772
section appsec
Agent [baseline] (1.208 s) : 0, 1207843
Total [baseline] (10.607 s) : 0, 10606893
Agent [candidate] (1.204 s) : 0, 1203769
Total [candidate] (10.586 s) : 0, 10585705
section iast
Agent [baseline] (1.202 s) : 0, 1202073
Total [baseline] (10.82 s) : 0, 10820070
Agent [candidate] (1.195 s) : 0, 1194625
Total [candidate] (10.836 s) : 0, 10835564
section profiling
Agent [baseline] (1.277 s) : 0, 1276599
Total [baseline] (10.582 s) : 0, 10581588
Agent [candidate] (1.265 s) : 0, 1265205
Total [candidate] (10.604 s) : 0, 10603883
gantt
title petclinic - break down per module: candidate=1.41.0-SNAPSHOT~96c6f534f8, baseline=1.41.0-SNAPSHOT~eadf0cc0d6
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (681.962 ms) : 0, 681962
BytebuddyAgent [candidate] (689.851 ms) : 0, 689851
GlobalTracer [baseline] (309.941 ms) : 0, 309941
GlobalTracer [candidate] (311.968 ms) : 0, 311968
AppSec [baseline] (53.844 ms) : 0, 53844
AppSec [candidate] (54.066 ms) : 0, 54066
Remote Config [baseline] (660.468 µs) : 0, 660
Remote Config [candidate] (661.115 µs) : 0, 661
Telemetry [baseline] (7.603 ms) : 0, 7603
Telemetry [candidate] (7.664 ms) : 0, 7664
section appsec
BytebuddyAgent [baseline] (702.332 ms) : 0, 702332
BytebuddyAgent [candidate] (699.447 ms) : 0, 699447
GlobalTracer [baseline] (308.487 ms) : 0, 308487
GlobalTracer [candidate] (307.43 ms) : 0, 307430
AppSec [baseline] (162.568 ms) : 0, 162568
AppSec [candidate] (162.522 ms) : 0, 162522
IAST [baseline] (21.623 ms) : 0, 21623
IAST [candidate] (20.927 ms) : 0, 20927
Remote Config [baseline] (635.456 µs) : 0, 635
Remote Config [candidate] (643.824 µs) : 0, 644
Telemetry [baseline] (9.307 ms) : 0, 9307
Telemetry [candidate] (9.6 ms) : 0, 9600
section iast
BytebuddyAgent [baseline] (802.072 ms) : 0, 802072
BytebuddyAgent [candidate] (796.492 ms) : 0, 796492
GlobalTracer [baseline] (299.995 ms) : 0, 299995
GlobalTracer [candidate] (298.761 ms) : 0, 298761
AppSec [baseline] (53.958 ms) : 0, 53958
AppSec [candidate] (54.803 ms) : 0, 54803
IAST [baseline] (24.534 ms) : 0, 24534
IAST [candidate] (23.292 ms) : 0, 23292
Remote Config [baseline] (603.675 µs) : 0, 604
Remote Config [candidate] (606.378 µs) : 0, 606
Telemetry [baseline] (7.195 ms) : 0, 7195
Telemetry [candidate] (7.019 ms) : 0, 7019
section profiling
BytebuddyAgent [baseline] (681.645 ms) : 0, 681645
BytebuddyAgent [candidate] (674.848 ms) : 0, 674848
GlobalTracer [baseline] (395.825 ms) : 0, 395825
GlobalTracer [candidate] (392.545 ms) : 0, 392545
AppSec [baseline] (55.15 ms) : 0, 55150
AppSec [candidate] (54.595 ms) : 0, 54595
Remote Config [baseline] (664.597 µs) : 0, 665
Remote Config [candidate] (652.956 µs) : 0, 653
Telemetry [baseline] (7.542 ms) : 0, 7542
Telemetry [candidate] (7.448 ms) : 0, 7448
ProfilingAgent [baseline] (96.713 ms) : 0, 96713
ProfilingAgent [candidate] (96.547 ms) : 0, 96547
Profiling [baseline] (96.737 ms) : 0, 96737
Profiling [candidate] (96.571 ms) : 0, 96571
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 1 performance regressions! Performance is the same for 12 metrics, 15 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.41.0-SNAPSHOT~96c6f534f8, baseline=1.41.0-SNAPSHOT~eadf0cc0d6
dateFormat X
axisFormat %s
section baseline
no_agent (1.358 ms) : 1338, 1378
. : milestone, 1358,
appsec (1.716 ms) : 1693, 1738
. : milestone, 1716,
appsec_no_iast (1.732 ms) : 1707, 1756
. : milestone, 1732,
iast (1.502 ms) : 1480, 1524
. : milestone, 1502,
profiling (1.494 ms) : 1471, 1516
. : milestone, 1494,
tracing (1.471 ms) : 1446, 1496
. : milestone, 1471,
section candidate
no_agent (1.354 ms) : 1335, 1374
. : milestone, 1354,
appsec (1.713 ms) : 1689, 1737
. : milestone, 1713,
appsec_no_iast (1.726 ms) : 1702, 1750
. : milestone, 1726,
iast (1.474 ms) : 1451, 1496
. : milestone, 1474,
profiling (1.58 ms) : 1555, 1605
. : milestone, 1580,
tracing (1.468 ms) : 1443, 1492
. : milestone, 1468,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.41.0-SNAPSHOT~96c6f534f8, baseline=1.41.0-SNAPSHOT~eadf0cc0d6
dateFormat X
axisFormat %s
section baseline
no_agent (375.03 µs) : 355, 395
. : milestone, 375,
iast (492.912 µs) : 471, 515
. : milestone, 493,
iast_FULL (560.581 µs) : 539, 582
. : milestone, 561,
iast_GLOBAL (511.553 µs) : 489, 534
. : milestone, 512,
iast_HARDCODED_SECRET_DISABLED (490.639 µs) : 469, 512
. : milestone, 491,
iast_INACTIVE (456.316 µs) : 435, 477
. : milestone, 456,
iast_TELEMETRY_OFF (486.661 µs) : 465, 509
. : milestone, 487,
tracing (451.483 µs) : 431, 472
. : milestone, 451,
section candidate
no_agent (384.866 µs) : 365, 405
. : milestone, 385,
iast (491.934 µs) : 470, 513
. : milestone, 492,
iast_FULL (564.633 µs) : 543, 586
. : milestone, 565,
iast_GLOBAL (510.934 µs) : 490, 532
. : milestone, 511,
iast_HARDCODED_SECRET_DISABLED (489.75 µs) : 468, 511
. : milestone, 490,
iast_INACTIVE (453.359 µs) : 433, 474
. : milestone, 453,
iast_TELEMETRY_OFF (481.129 µs) : 459, 503
. : milestone, 481,
tracing (446.745 µs) : 426, 467
. : milestone, 447,
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 biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.41.0-SNAPSHOT~96c6f534f8, baseline=1.41.0-SNAPSHOT~eadf0cc0d6
dateFormat X
axisFormat %s
section baseline
no_agent (15.194 s) : 15194000, 15194000
. : milestone, 15194000,
appsec (15.089 s) : 15089000, 15089000
. : milestone, 15089000,
iast (18.905 s) : 18905000, 18905000
. : milestone, 18905000,
iast_GLOBAL (18.244 s) : 18244000, 18244000
. : milestone, 18244000,
profiling (15.106 s) : 15106000, 15106000
. : milestone, 15106000,
tracing (15.275 s) : 15275000, 15275000
. : milestone, 15275000,
section candidate
no_agent (15.163 s) : 15163000, 15163000
. : milestone, 15163000,
appsec (15.249 s) : 15249000, 15249000
. : milestone, 15249000,
iast (18.771 s) : 18771000, 18771000
. : milestone, 18771000,
iast_GLOBAL (18.038 s) : 18038000, 18038000
. : milestone, 18038000,
profiling (14.914 s) : 14914000, 14914000
. : milestone, 14914000,
tracing (15.286 s) : 15286000, 15286000
. : milestone, 15286000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.41.0-SNAPSHOT~96c6f534f8, baseline=1.41.0-SNAPSHOT~eadf0cc0d6
dateFormat X
axisFormat %s
section baseline
no_agent (1.47 ms) : 1459, 1482
. : milestone, 1470,
appsec (2.334 ms) : 2293, 2375
. : milestone, 2334,
iast (2.085 ms) : 2034, 2136
. : milestone, 2085,
iast_GLOBAL (2.126 ms) : 2074, 2178
. : milestone, 2126,
profiling (1.947 ms) : 1906, 1989
. : milestone, 1947,
tracing (1.93 ms) : 1891, 1970
. : milestone, 1930,
section candidate
no_agent (1.474 ms) : 1463, 1486
. : milestone, 1474,
appsec (2.374 ms) : 2332, 2416
. : milestone, 2374,
iast (2.079 ms) : 2028, 2131
. : milestone, 2079,
iast_GLOBAL (2.13 ms) : 2078, 2183
. : milestone, 2130,
profiling (1.963 ms) : 1922, 2004
. : milestone, 1963,
tracing (1.923 ms) : 1883, 1962
. : milestone, 1923,
|
What Does This Do
javac
begins the range of a local var in the LocalVariableTable just after the store instruction at the init.kotlinc
is more free to introduce nop/other instructions in-between. need to scan backward from the start of the range to find the last store of this slot to begin the rewrite of the slot needed to hoist correctly local vars.Motivation
Additional Notes
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: DEBUG-2974