Skip to content

Hoist local vars for exception probes - #11964

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
masterfrom
jpbempel/add-hoisting-for-er
Jul 22, 2026
Merged

gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
masterfrom
jpbempel/add-hoisting-for-er

Conversation

@jpbempel

@jpbempel jpbempel commented Jul 15, 2026

Copy link
Copy Markdown
Member

What Does This Do

Exception probe instrumentation was not performing hoisting of local vars which is in fact required if we want to capture those locals because the wrapping with try/catch of the whole method body create sub scope preventing locals to be captured in the catch clause.

Motivation

Additional Notes

Contributor Checklist

Jira ticket: DEBUG-5838

@jpbempel
jpbempel requested a review from a team as a code owner July 15, 2026 15:56
@jpbempel
jpbempel requested review from andreimatei and removed request for a team July 15, 2026 15:56
@jpbempel jpbempel added the comp: debugger Dynamic Instrumentation label Jul 15, 2026
@dd-octo-sts

dd-octo-sts Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Hi! 👋 Thanks for your pull request! 🎉

To help us review it, please make sure to:

  • Add at least one type, and one component or instrumentation label to the pull request

If you need help, please check our contributing guidelines.

@jpbempel jpbempel added the type: feature Enhancements and improvements label Jul 15, 2026
@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 57.17% (-0.01%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: e8a8fe1 | Docs | Datadog PR Page | Give us feedback!

@datadog-datadog-prod-us1-2 datadog-datadog-prod-us1-2 Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Datadog Autotest: PASS

More details

The hoisting-before-computeFrames ordering in ExceptionInstrumenter is safe: the inserted STORE instructions use node-identity equality in the frames IdentityHashMap so frames for original RETURN nodes are unaffected. The ConfigurationUpdater change is a correct refactoring — injected config and Config.get() are the same singleton in production, and the test mock's stubbed values match the real defaults for every method DebuggerTransformer calls.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Datadog Autotest · Commit 154692d · What is Autotest? · Any feedback? Reach out in #autotest

@pr-commenter

pr-commenter Bot commented Jul 15, 2026

Copy link
Copy Markdown

Debugger benchmarks

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
ci_job_date 1784139379 1784139726
end_time 2026-07-15T18:17:45 2026-07-15T18:23:31
git_branch master jpbempel/add-hoisting-for-er
git_commit_sha d3d2e12 e8a8fe1
start_time 2026-07-15T18:16:20 2026-07-15T18:22:07
See matching parameters
Baseline Candidate
ci_job_id 1862793250 1862793250
ci_pipeline_id 124839006 124839006
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
git_commit_date 1784138737 1784138737

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
[-36.729µs; +25.676µs] or [-12.226%; +8.547%]
unstable
[-53.084µs; +35.293µs] or [-15.399%; +10.238%]
unstable
[-64.961µs; +45.168µs] or [-17.952%; +12.482%]
unstable
[-128.919µs; +100.371µs] or [-11.026%; +8.584%]
same
scenario:basic same same same unstable
[-103.509µs; +135.445µs] or [-9.716%; +12.714%]
unstable
[-108.011op/s; +229.962op/s] or [-4.428%; +9.428%]
scenario:loop same 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 (344.717 µs) : 294, 395
.   : milestone, 345,
basic (298.792 µs) : 292, 306
.   : milestone, 299,
loop (8.979 ms) : 8957, 9001
.   : milestone, 8979,
section candidate
noprobe (335.821 µs) : 304, 368
.   : milestone, 336,
basic (296.899 µs) : 290, 304
.   : milestone, 297,
loop (8.968 ms) : 8963, 8973
.   : milestone, 8968,
Loading
  • baseline results
Scenario Request median duration [CI 0.99]
noprobe 344.717 µs [294.474 µs, 394.959 µs]
basic 298.792 µs [291.565 µs, 306.018 µs]
loop 8.979 ms [8.957 ms, 9.001 ms]
  • candidate results
Scenario Request median duration [CI 0.99]
noprobe 335.821 µs [304.115 µs, 367.528 µs]
basic 296.899 µs [290.099 µs, 303.698 µs]
loop 8.968 ms [8.963 ms, 8.973 ms]

@dd-octo-sts

dd-octo-sts Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 13.97 s 14.04 s [-1.3%; +0.3%] (no difference)
startup:insecure-bank:tracing:Agent 12.90 s 12.96 s [-1.2%; +0.3%] (no difference)
startup:petclinic:appsec:Agent 15.91 s 16.74 s [-10.8%; +0.9%] (unstable)
startup:petclinic:iast:Agent 16.96 s 16.96 s [-1.1%; +1.2%] (no difference)
startup:petclinic:profiling:Agent 16.58 s 16.77 s [-2.4%; +0.3%] (no difference)
startup:petclinic:sca:Agent 16.85 s 16.72 s [-0.2%; +1.6%] (no difference)
startup:petclinic:tracing:Agent 16.09 s 16.09 s [-1.0%; +1.0%] (no difference)

Commit: e8a8fe1d · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

View session in Datadog

Bits Code status: ✅ Done

Comment @DataDog to request changes

Exception probe instrumentation was not performing hoisting of local
vars which is in fact required if we want to capture those locals
because the wrapping with try/catch of the whole method body create
sub scope preventing locals to be captured in the catch clause.
@jpbempel
jpbempel force-pushed the jpbempel/add-hoisting-for-er branch from 154692d to e8a8fe1 Compare July 15, 2026 18:05
@jpbempel
jpbempel added this pull request to the merge queue Jul 22, 2026
@dd-octo-sts

dd-octo-sts Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Jul 22, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-07-22 05:14:47 UTC ℹ️ Start processing command /merge


2026-07-22 05:14:53 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 1h (p90).


2026-07-22 06:19:08 UTC ℹ️ MergeQueue: This merge request was merged

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 22, 2026
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 27ad2de into master Jul 22, 2026
978 of 985 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the jpbempel/add-hoisting-for-er branch July 22, 2026 06:19
@github-actions github-actions Bot added this to the 1.65.0 milestone Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: debugger Dynamic Instrumentation type: feature Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants