Skip to content
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

Add collection of local var for method probe #7548

Merged
merged 3 commits into from
Sep 5, 2024

Conversation

jpbempel
Copy link
Member

@jpbempel jpbempel commented Sep 2, 2024

What Does This Do

Collecting local var was disabled for method probe/unhanded exception because all local vars are not accessible/defined. But for Exception Debugging/Replay this is very useful to have. The solution is to hoist local variable at the top level of the method and initialize them to be able to capture them at any point of the method.
we are handling also the case of duplicate local var in different scope but with incompatible types

Motivation

Collecting local vars even if uncaught exception

Additional Notes

Contributor Checklist

Jira ticket: DEBUG-2778

Collecting local var was disabled for method probe/unhanded exception
because all local vars are not accessible/defined.
But for Exception Debugging/Replay this is very useful to have.
The solution is to hoist local variable at the top level of the method
and initialize them to be able to capture them at any point of the
method.
we are handling also the case of duplicate local var in different
scope but with incompatible types
@jpbempel jpbempel requested a review from a team as a code owner September 2, 2024 13:19
@jpbempel jpbempel requested review from cimi and removed request for a team September 2, 2024 13:19
@jpbempel jpbempel added comp: debugger Dynamic Instrumentation type: enhancement labels Sep 2, 2024
@pr-commenter
Copy link

pr-commenter bot commented Sep 2, 2024

Debugger benchmarks

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
ci_job_date 1725548669 1725549048
end_time 2024-09-05T15:05:42 2024-09-05T15:12:02
git_branch master jpbempel/collect-local-vars-uncaught-ex
git_commit_sha 123a2c8 0d1e45c
start_time 2024-09-05T15:04:30 2024-09-05T15:10:49
See matching parameters
Baseline Candidate
ci_job_id 628902306 628902306
ci_pipeline_id 43626523 43626523
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
git_commit_date 1725548040 1725548040

Summary

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

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:basic worse
[+6.012µs; +21.398µs] or [+2.291%; +8.155%]
worse
[+7.154µs; +29.287µs] or [+2.517%; +10.306%]
worse
[+7.328µs; +32.293µs] or [+2.513%; +11.074%]
unstable
[-38.701µs; +50.878µs] or [-6.476%; +8.514%]
unstable
[-298.751op/s; +21.551op/s] or [-11.054%; +0.797%]
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
[-22.939µs; +36.218µs] or [-8.952%; +14.134%]
unstable
[-30.081µs; +58.448µs] or [-10.382%; +20.173%]
unstable
[-40.794µs; +71.184µs] or [-13.416%; +23.410%]
unstable
[-93.914µs; +125.113µs] or [-14.765%; +19.670%]
same
scenario:loop unsure
[+5.249µs; +31.594µs] or [+0.051%; +0.305%]
same 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 (289.735 µs) : 258, 322
.   : milestone, 290,
basic (284.161 µs) : 275, 293
.   : milestone, 284,
loop (10.512 ms) : 10479, 10546
.   : milestone, 10512,
section candidate
noprobe (303.919 µs) : 253, 354
.   : milestone, 304,
basic (302.381 µs) : 290, 315
.   : milestone, 302,
loop (10.523 ms) : 10489, 10557
.   : milestone, 10523,
Loading
  • baseline results
Scenario Request median duration [CI 0.99]
noprobe 289.735 µs [257.776 µs, 321.695 µs]
basic 284.161 µs [274.898 µs, 293.423 µs]
loop 10.512 ms [10.479 ms, 10.546 ms]
  • candidate results
Scenario Request median duration [CI 0.99]
noprobe 303.919 µs [253.448 µs, 354.39 µs]
basic 302.381 µs [290.17 µs, 314.592 µs]
loop 10.523 ms [10.489 ms, 10.557 ms]

@pr-commenter
Copy link

pr-commenter bot commented Sep 2, 2024

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master jpbempel/collect-local-vars-uncaught-ex
git_commit_date 1725545464 1725548040
git_commit_sha 123a2c8 0d1e45c
release_version 1.40.0-SNAPSHOT~123a2c8614 1.39.0-SNAPSHOT~0d1e45ca47
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1725550506 1725550506
ci_job_id 628902300 628902300
ci_pipeline_id 43626523 43626523
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
module Agent Agent
parent None None
variant iast iast

Summary

Found 1 performance improvements and 0 performance regressions! Performance is the same for 48 metrics, 14 unstable metrics.

scenario Δ mean execution_time candidate mean execution_time baseline mean execution_time
scenario:startup:insecure-bank:iast_HARDCODED_SECRET_DISABLED:AppSec better
[-7.926ms; -5.002ms] or [-14.425%; -9.104%]
48.478ms 54.942ms
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.39.0-SNAPSHOT~0d1e45ca47, baseline=1.40.0-SNAPSHOT~123a2c8614

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.053 s) : 0, 1053314
Total [baseline] (10.392 s) : 0, 10391893
Agent [candidate] (1.051 s) : 0, 1051085
Total [candidate] (10.512 s) : 0, 10512357
section appsec
Agent [baseline] (1.193 s) : 0, 1193060
Total [baseline] (10.642 s) : 0, 10642345
Agent [candidate] (1.177 s) : 0, 1177495
Total [candidate] (10.557 s) : 0, 10557302
section iast
Agent [baseline] (1.175 s) : 0, 1175269
Total [baseline] (10.866 s) : 0, 10865529
Agent [candidate] (1.184 s) : 0, 1184464
Total [candidate] (10.85 s) : 0, 10850441
section profiling
Agent [baseline] (1.25 s) : 0, 1249749
Total [baseline] (10.643 s) : 0, 10643037
Agent [candidate] (1.265 s) : 0, 1264809
Total [candidate] (10.694 s) : 0, 10693998
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.053 s -
Agent appsec 1.193 s 139.746 ms (13.3%)
Agent iast 1.175 s 121.955 ms (11.6%)
Agent profiling 1.25 s 196.435 ms (18.6%)
Total tracing 10.392 s -
Total appsec 10.642 s 250.452 ms (2.4%)
Total iast 10.866 s 473.636 ms (4.6%)
Total profiling 10.643 s 251.144 ms (2.4%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.051 s -
Agent appsec 1.177 s 126.41 ms (12.0%)
Agent iast 1.184 s 133.379 ms (12.7%)
Agent profiling 1.265 s 213.723 ms (20.3%)
Total tracing 10.512 s -
Total appsec 10.557 s 44.945 ms (0.4%)
Total iast 10.85 s 338.083 ms (3.2%)
Total profiling 10.694 s 181.641 ms (1.7%)
gantt
    title petclinic - break down per module: candidate=1.39.0-SNAPSHOT~0d1e45ca47, baseline=1.40.0-SNAPSHOT~123a2c8614

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (671.998 ms) : 0, 671998
BytebuddyAgent [candidate] (670.518 ms) : 0, 670518
GlobalTracer [baseline] (307.958 ms) : 0, 307958
GlobalTracer [candidate] (307.354 ms) : 0, 307354
AppSec [baseline] (51.604 ms) : 0, 51604
AppSec [candidate] (51.49 ms) : 0, 51490
Remote Config [baseline] (672.872 µs) : 0, 673
Remote Config [candidate] (683.87 µs) : 0, 684
Telemetry [baseline] (7.494 ms) : 0, 7494
Telemetry [candidate] (7.475 ms) : 0, 7475
section appsec
BytebuddyAgent [baseline] (697.433 ms) : 0, 697433
BytebuddyAgent [candidate] (682.945 ms) : 0, 682945
GlobalTracer [baseline] (302.418 ms) : 0, 302418
GlobalTracer [candidate] (302.571 ms) : 0, 302571
AppSec [baseline] (160.029 ms) : 0, 160029
AppSec [candidate] (160.932 ms) : 0, 160932
Remote Config [baseline] (626.783 µs) : 0, 627
Remote Config [candidate] (630.963 µs) : 0, 631
Telemetry [baseline] (8.62 ms) : 0, 8620
Telemetry [candidate] (7.536 ms) : 0, 7536
IAST [baseline] (20.474 ms) : 0, 20474
IAST [candidate] (18.481 ms) : 0, 18481
section iast
BytebuddyAgent [baseline] (781.599 ms) : 0, 781599
BytebuddyAgent [candidate] (786.052 ms) : 0, 786052
GlobalTracer [baseline] (296.569 ms) : 0, 296569
GlobalTracer [candidate] (298.925 ms) : 0, 298925
AppSec [baseline] (50.706 ms) : 0, 50706
AppSec [candidate] (52.535 ms) : 0, 52535
Remote Config [baseline] (576.322 µs) : 0, 576
Remote Config [candidate] (608.571 µs) : 0, 609
Telemetry [baseline] (7.986 ms) : 0, 7986
Telemetry [candidate] (9.671 ms) : 0, 9671
IAST [baseline] (24.256 ms) : 0, 24256
IAST [candidate] (22.973 ms) : 0, 22973
section profiling
BytebuddyAgent [baseline] (665.904 ms) : 0, 665904
BytebuddyAgent [candidate] (673.106 ms) : 0, 673106
GlobalTracer [baseline] (389.344 ms) : 0, 389344
GlobalTracer [candidate] (394.762 ms) : 0, 394762
AppSec [baseline] (52.352 ms) : 0, 52352
AppSec [candidate] (53.14 ms) : 0, 53140
Remote Config [baseline] (688.594 µs) : 0, 689
Remote Config [candidate] (702.87 µs) : 0, 703
Telemetry [baseline] (7.395 ms) : 0, 7395
Telemetry [candidate] (7.47 ms) : 0, 7470
ProfilingAgent [baseline] (96.225 ms) : 0, 96225
ProfilingAgent [candidate] (97.949 ms) : 0, 97949
Profiling [baseline] (96.249 ms) : 0, 96249
Profiling [candidate] (97.973 ms) : 0, 97973
Loading
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.39.0-SNAPSHOT~0d1e45ca47, baseline=1.40.0-SNAPSHOT~123a2c8614

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.053 s) : 0, 1053213
Total [baseline] (8.536 s) : 0, 8536327
Agent [candidate] (1.055 s) : 0, 1054799
Total [candidate] (8.497 s) : 0, 8497196
section iast
Agent [baseline] (1.185 s) : 0, 1184811
Total [baseline] (9.039 s) : 0, 9038817
Agent [candidate] (1.183 s) : 0, 1183019
Total [candidate] (9.044 s) : 0, 9044385
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.176 s) : 0, 1175927
Total [baseline] (8.959 s) : 0, 8958678
Agent [candidate] (1.173 s) : 0, 1173050
Total [candidate] (8.98 s) : 0, 8979509
section iast_TELEMETRY_OFF
Agent [baseline] (1.175 s) : 0, 1175197
Total [baseline] (8.979 s) : 0, 8978594
Agent [candidate] (1.172 s) : 0, 1171627
Total [candidate] (8.973 s) : 0, 8972912
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.053 s -
Agent iast 1.185 s 131.598 ms (12.5%)
Agent iast_HARDCODED_SECRET_DISABLED 1.176 s 122.714 ms (11.7%)
Agent iast_TELEMETRY_OFF 1.175 s 121.983 ms (11.6%)
Total tracing 8.536 s -
Total iast 9.039 s 502.49 ms (5.9%)
Total iast_HARDCODED_SECRET_DISABLED 8.959 s 422.351 ms (4.9%)
Total iast_TELEMETRY_OFF 8.979 s 442.267 ms (5.2%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.055 s -
Agent iast 1.183 s 128.22 ms (12.2%)
Agent iast_HARDCODED_SECRET_DISABLED 1.173 s 118.251 ms (11.2%)
Agent iast_TELEMETRY_OFF 1.172 s 116.828 ms (11.1%)
Total tracing 8.497 s -
Total iast 9.044 s 547.19 ms (6.4%)
Total iast_HARDCODED_SECRET_DISABLED 8.98 s 482.313 ms (5.7%)
Total iast_TELEMETRY_OFF 8.973 s 475.716 ms (5.6%)
gantt
    title insecure-bank - break down per module: candidate=1.39.0-SNAPSHOT~0d1e45ca47, baseline=1.40.0-SNAPSHOT~123a2c8614

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (672.134 ms) : 0, 672134
BytebuddyAgent [candidate] (674.196 ms) : 0, 674196
GlobalTracer [baseline] (308.106 ms) : 0, 308106
GlobalTracer [candidate] (307.485 ms) : 0, 307485
AppSec [baseline] (51.214 ms) : 0, 51214
AppSec [candidate] (51.327 ms) : 0, 51327
Remote Config [baseline] (664.22 µs) : 0, 664
Remote Config [candidate] (664.497 µs) : 0, 664
Telemetry [baseline] (7.493 ms) : 0, 7493
Telemetry [candidate] (7.455 ms) : 0, 7455
section iast
BytebuddyAgent [baseline] (788.27 ms) : 0, 788270
BytebuddyAgent [candidate] (785.867 ms) : 0, 785867
GlobalTracer [baseline] (298.619 ms) : 0, 298619
GlobalTracer [candidate] (298.826 ms) : 0, 298826
AppSec [baseline] (53.241 ms) : 0, 53241
AppSec [candidate] (51.975 ms) : 0, 51975
IAST [baseline] (22.215 ms) : 0, 22215
IAST [candidate] (23.775 ms) : 0, 23775
Remote Config [baseline] (604.975 µs) : 0, 605
Remote Config [candidate] (605.482 µs) : 0, 605
Telemetry [baseline] (8.183 ms) : 0, 8183
Telemetry [candidate] (8.261 ms) : 0, 8261
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (781.352 ms) : 0, 781352
BytebuddyAgent [candidate] (778.464 ms) : 0, 778464
GlobalTracer [baseline] (296.893 ms) : 0, 296893
GlobalTracer [candidate] (296.638 ms) : 0, 296638
AppSec [baseline] (54.942 ms) : 0, 54942
AppSec [candidate] (48.478 ms) : 0, 48478
IAST [baseline] (21.158 ms) : 0, 21158
IAST [candidate] (24.105 ms) : 0, 24105
Remote Config [baseline] (580.301 µs) : 0, 580
Remote Config [candidate] (601.639 µs) : 0, 602
Telemetry [baseline] (7.39 ms) : 0, 7390
Telemetry [candidate] (11.158 ms) : 0, 11158
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (781.444 ms) : 0, 781444
BytebuddyAgent [candidate] (777.512 ms) : 0, 777512
GlobalTracer [baseline] (296.789 ms) : 0, 296789
GlobalTracer [candidate] (296.574 ms) : 0, 296574
AppSec [baseline] (53.797 ms) : 0, 53797
AppSec [candidate] (50.616 ms) : 0, 50616
IAST [baseline] (20.994 ms) : 0, 20994
IAST [candidate] (24.089 ms) : 0, 24089
Remote Config [baseline] (569.931 µs) : 0, 570
Remote Config [candidate] (598.576 µs) : 0, 599
Telemetry [baseline] (7.969 ms) : 0, 7969
Telemetry [candidate] (8.634 ms) : 0, 8634
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2024-09-05T15:05:41 2024-09-05T15:12:31
git_branch master jpbempel/collect-local-vars-uncaught-ex
git_commit_date 1725545464 1725548040
git_commit_sha 123a2c8 0d1e45c
release_version 1.40.0-SNAPSHOT~123a2c8614 1.39.0-SNAPSHOT~0d1e45ca47
start_time 2024-09-05T15:05:28 2024-09-05T15:12:17
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1725549497 1725549497
ci_job_id 628902301 628902301
ci_pipeline_id 43626523 43626523
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
variant iast iast

Summary

Found 0 performance improvements and 1 performance regressions! Performance is the same for 10 metrics, 17 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:petclinic:profiling worse
[+31.164µs; +82.622µs] or [+2.086%; +5.532%]
unstable
[-560.727op/s; +560.727op/s] or [-18.224%; +18.224%]
1.551ms 3076.923op/s 1.494ms 3076.923op/s
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.39.0-SNAPSHOT~0d1e45ca47, baseline=1.40.0-SNAPSHOT~123a2c8614
    dateFormat X
    axisFormat %s
section baseline
no_agent (366.639 µs) : 347, 386
.   : milestone, 367,
iast (491.071 µs) : 469, 513
.   : milestone, 491,
iast_FULL (552.832 µs) : 532, 574
.   : milestone, 553,
iast_GLOBAL (505.801 µs) : 485, 527
.   : milestone, 506,
iast_HARDCODED_SECRET_DISABLED (482.318 µs) : 461, 504
.   : milestone, 482,
iast_INACTIVE (453.584 µs) : 433, 474
.   : milestone, 454,
iast_TELEMETRY_OFF (470.539 µs) : 448, 493
.   : milestone, 471,
tracing (443.749 µs) : 423, 465
.   : milestone, 444,
section candidate
no_agent (378.723 µs) : 359, 398
.   : milestone, 379,
iast (490.523 µs) : 468, 513
.   : milestone, 491,
iast_FULL (554.27 µs) : 533, 575
.   : milestone, 554,
iast_GLOBAL (511.3 µs) : 490, 533
.   : milestone, 511,
iast_HARDCODED_SECRET_DISABLED (487.024 µs) : 465, 509
.   : milestone, 487,
iast_INACTIVE (451.453 µs) : 430, 473
.   : milestone, 451,
iast_TELEMETRY_OFF (479.981 µs) : 457, 503
.   : milestone, 480,
tracing (438.838 µs) : 419, 459
.   : milestone, 439,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 366.639 µs [347.259 µs, 386.019 µs] -
iast 491.071 µs [468.829 µs, 513.314 µs] 124.432 µs (33.9%)
iast_FULL 552.832 µs [531.952 µs, 573.712 µs] 186.193 µs (50.8%)
iast_GLOBAL 505.801 µs [484.973 µs, 526.63 µs] 139.162 µs (38.0%)
iast_HARDCODED_SECRET_DISABLED 482.318 µs [460.879 µs, 503.756 µs] 115.678 µs (31.6%)
iast_INACTIVE 453.584 µs [433.145 µs, 474.023 µs] 86.945 µs (23.7%)
iast_TELEMETRY_OFF 470.539 µs [448.271 µs, 492.807 µs] 103.9 µs (28.3%)
tracing 443.749 µs [422.571 µs, 464.927 µs] 77.11 µs (21.0%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 378.723 µs [359.06 µs, 398.387 µs] -
iast 490.523 µs [468.126 µs, 512.92 µs] 111.8 µs (29.5%)
iast_FULL 554.27 µs [533.07 µs, 575.47 µs] 175.547 µs (46.4%)
iast_GLOBAL 511.3 µs [489.522 µs, 533.078 µs] 132.577 µs (35.0%)
iast_HARDCODED_SECRET_DISABLED 487.024 µs [465.207 µs, 508.84 µs] 108.301 µs (28.6%)
iast_INACTIVE 451.453 µs [430.045 µs, 472.862 µs] 72.73 µs (19.2%)
iast_TELEMETRY_OFF 479.981 µs [457.366 µs, 502.596 µs] 101.258 µs (26.7%)
tracing 438.838 µs [418.611 µs, 459.066 µs] 60.115 µs (15.9%)
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.39.0-SNAPSHOT~0d1e45ca47, baseline=1.40.0-SNAPSHOT~123a2c8614
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.341 ms) : 1322, 1361
.   : milestone, 1341,
appsec (1.74 ms) : 1716, 1763
.   : milestone, 1740,
appsec_no_iast (1.736 ms) : 1712, 1761
.   : milestone, 1736,
iast (1.484 ms) : 1462, 1507
.   : milestone, 1484,
profiling (1.494 ms) : 1470, 1517
.   : milestone, 1494,
tracing (1.46 ms) : 1435, 1484
.   : milestone, 1460,
section candidate
no_agent (1.336 ms) : 1318, 1354
.   : milestone, 1336,
appsec (1.734 ms) : 1711, 1757
.   : milestone, 1734,
appsec_no_iast (1.705 ms) : 1680, 1730
.   : milestone, 1705,
iast (1.472 ms) : 1449, 1495
.   : milestone, 1472,
profiling (1.551 ms) : 1526, 1575
.   : milestone, 1551,
tracing (1.482 ms) : 1458, 1507
.   : milestone, 1482,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.341 ms [1.322 ms, 1.361 ms] -
appsec 1.74 ms [1.716 ms, 1.763 ms] 398.386 µs (29.7%)
appsec_no_iast 1.736 ms [1.712 ms, 1.761 ms] 395.181 µs (29.5%)
iast 1.484 ms [1.462 ms, 1.507 ms] 143.079 µs (10.7%)
profiling 1.494 ms [1.47 ms, 1.517 ms] 152.374 µs (11.4%)
tracing 1.46 ms [1.435 ms, 1.484 ms] 118.507 µs (8.8%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.336 ms [1.318 ms, 1.354 ms] -
appsec 1.734 ms [1.711 ms, 1.757 ms] 397.587 µs (29.8%)
appsec_no_iast 1.705 ms [1.68 ms, 1.73 ms] 369.117 µs (27.6%)
iast 1.472 ms [1.449 ms, 1.495 ms] 135.979 µs (10.2%)
profiling 1.551 ms [1.526 ms, 1.575 ms] 214.5 µs (16.1%)
tracing 1.482 ms [1.458 ms, 1.507 ms] 146.394 µs (11.0%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master jpbempel/collect-local-vars-uncaught-ex
git_commit_date 1725545464 1725548040
git_commit_sha 123a2c8 0d1e45c
release_version 1.40.0-SNAPSHOT~123a2c8614 1.39.0-SNAPSHOT~0d1e45ca47
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1725550017 1725550017
ci_job_id 628902302 628902302
ci_pipeline_id 43626523 43626523
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
variant appsec appsec

Summary

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

Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.39.0-SNAPSHOT~0d1e45ca47, baseline=1.40.0-SNAPSHOT~123a2c8614
    dateFormat X
    axisFormat %s
section baseline
no_agent (14.959 s) : 14959000, 14959000
.   : milestone, 14959000,
appsec (15.25 s) : 15250000, 15250000
.   : milestone, 15250000,
iast (18.983 s) : 18983000, 18983000
.   : milestone, 18983000,
iast_GLOBAL (18.112 s) : 18112000, 18112000
.   : milestone, 18112000,
profiling (15.459 s) : 15459000, 15459000
.   : milestone, 15459000,
tracing (14.912 s) : 14912000, 14912000
.   : milestone, 14912000,
section candidate
no_agent (14.978 s) : 14978000, 14978000
.   : milestone, 14978000,
appsec (15.154 s) : 15154000, 15154000
.   : milestone, 15154000,
iast (18.786 s) : 18786000, 18786000
.   : milestone, 18786000,
iast_GLOBAL (17.702 s) : 17702000, 17702000
.   : milestone, 17702000,
profiling (15.077 s) : 15077000, 15077000
.   : milestone, 15077000,
tracing (15.37 s) : 15370000, 15370000
.   : milestone, 15370000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.959 s [14.959 s, 14.959 s] -
appsec 15.25 s [15.25 s, 15.25 s] 291.0 ms (1.9%)
iast 18.983 s [18.983 s, 18.983 s] 4.024 s (26.9%)
iast_GLOBAL 18.112 s [18.112 s, 18.112 s] 3.153 s (21.1%)
profiling 15.459 s [15.459 s, 15.459 s] 500.0 ms (3.3%)
tracing 14.912 s [14.912 s, 14.912 s] -47.0 ms (-0.3%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.978 s [14.978 s, 14.978 s] -
appsec 15.154 s [15.154 s, 15.154 s] 176.0 ms (1.2%)
iast 18.786 s [18.786 s, 18.786 s] 3.808 s (25.4%)
iast_GLOBAL 17.702 s [17.702 s, 17.702 s] 2.724 s (18.2%)
profiling 15.077 s [15.077 s, 15.077 s] 99.0 ms (0.7%)
tracing 15.37 s [15.37 s, 15.37 s] 392.0 ms (2.6%)
Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.39.0-SNAPSHOT~0d1e45ca47, baseline=1.40.0-SNAPSHOT~123a2c8614
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.455 ms) : 1444, 1466
.   : milestone, 1455,
appsec (2.22 ms) : 2184, 2255
.   : milestone, 2220,
iast (1.989 ms) : 1945, 2032
.   : milestone, 1989,
iast_GLOBAL (2.022 ms) : 1978, 2066
.   : milestone, 2022,
profiling (1.857 ms) : 1823, 1892
.   : milestone, 1857,
tracing (1.842 ms) : 1809, 1876
.   : milestone, 1842,
section candidate
no_agent (1.457 ms) : 1445, 1468
.   : milestone, 1457,
appsec (2.21 ms) : 2175, 2244
.   : milestone, 2210,
iast (1.972 ms) : 1929, 2015
.   : milestone, 1972,
iast_GLOBAL (2.013 ms) : 1970, 2057
.   : milestone, 2013,
profiling (1.849 ms) : 1814, 1884
.   : milestone, 1849,
tracing (1.839 ms) : 1806, 1873
.   : milestone, 1839,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.455 ms [1.444 ms, 1.466 ms] -
appsec 2.22 ms [2.184 ms, 2.255 ms] 764.976 µs (52.6%)
iast 1.989 ms [1.945 ms, 2.032 ms] 534.011 µs (36.7%)
iast_GLOBAL 2.022 ms [1.978 ms, 2.066 ms] 566.806 µs (39.0%)
profiling 1.857 ms [1.823 ms, 1.892 ms] 402.482 µs (27.7%)
tracing 1.842 ms [1.809 ms, 1.876 ms] 387.335 µs (26.6%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.457 ms [1.445 ms, 1.468 ms] -
appsec 2.21 ms [2.175 ms, 2.244 ms] 753.193 µs (51.7%)
iast 1.972 ms [1.929 ms, 2.015 ms] 515.572 µs (35.4%)
iast_GLOBAL 2.013 ms [1.97 ms, 2.057 ms] 556.713 µs (38.2%)
profiling 1.849 ms [1.814 ms, 1.884 ms] 392.313 µs (26.9%)
tracing 1.839 ms [1.806 ms, 1.873 ms] 382.74 µs (26.3%)

@jpbempel jpbempel force-pushed the jpbempel/collect-local-vars-uncaught-ex branch from 2fed31d to 633fa81 Compare September 2, 2024 16:42
@@ -40,6 +41,26 @@ public void ensureSafeLoadClass() {
assertEquals(ASMHelperTest.class, clazz);
}

@Test
public void isStoreCompatibleType() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we also validate it return false?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -2298,7 +2381,7 @@ private TestSnapshotListener installProbes(
Config config = mock(Config.class);
when(config.isDebuggerEnabled()).thenReturn(true);
when(config.isDebuggerClassFileDumpEnabled()).thenReturn(true);
when(config.isDebuggerVerifyByteCode()).thenReturn(true);
when(config.isDebuggerVerifyByteCode()).thenReturn(false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this return false now?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

debug left over

@@ -451,6 +458,76 @@ private void instrumentMethodEnter() {
methodNode.instructions.insert(methodEnterLabel, insnList);
}

private Collection<LocalVariableNode> initLocalVars(InsnList insnList) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nir: rename to initAndHoistLocalVars to better reflect what this does

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

continue;
}
if (!checkDuplicateLocalVar(localVar, localVarsByName)) {
duplicateNames.add(localVar.name);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want to debug log message that this variables was not hoisted? might be a good for support cases. there is already report warning inside checkDuplicatedLocalVar - but I believe it would read better for people not deep in the code.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

redundant with the warning

@jpbempel jpbempel merged commit a694025 into master Sep 5, 2024
99 checks passed
@jpbempel jpbempel deleted the jpbempel/collect-local-vars-uncaught-ex branch September 5, 2024 15:51
@github-actions github-actions bot added this to the 1.40.0 milestone Sep 5, 2024
@jpbempel jpbempel mentioned this pull request Sep 16, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants