Skip to content

Fix Kotlin Debug source mapping#11803

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
masterfrom
jpbempel/fix-kotlindebug
Jul 1, 2026
Merged

Fix Kotlin Debug source mapping#11803
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
masterfrom
jpbempel/fix-kotlindebug

Conversation

@jpbempel

@jpbempel jpbempel commented Jun 30, 2026

Copy link
Copy Markdown
Member

What Does This Do

KotlinDebug stratum in SMAP is not always emitted
if not present make one empty and avoid throwing exception

Motivation

Additional Notes

Contributor Checklist

  • Format the title according to the contribution guidelines
  • Assign the type: and (comp: or inst:) labels in addition to any other useful labels
  • Avoid using close, fix, or any linking keywords when referencing an issue
    Use solves instead, and assign the PR milestone to the issue
  • Update the CODEOWNERS file on source file addition, migration, or deletion
  • Update public documentation with any new configuration flags or behaviors
  • Add your completed PR to the merge queue by commenting /merge. You can also:
    • Customize the commit message associated with the merge with /merge --commit-message "..."
    • Remove your PR from the merge queue with /merge -c
    • Skip all merge queue checks with /merge -f --reason "reason"; please use this judiciously, as some checks do not run at the PR-level (note: the PR still needs to be mergeable, this will only skip the pre-merge build)
    • Get more information in this doc

Jira ticket: DEBUG-5799

@jpbempel jpbempel requested a review from a team as a code owner June 30, 2026 10:06
@jpbempel jpbempel requested review from dudikeleti and removed request for a team June 30, 2026 10:06
@dd-octo-sts

dd-octo-sts Bot commented Jun 30, 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 requested review from ojung and removed request for dudikeleti June 30, 2026 10:07

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fcb11d1d64

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

StratumExt stratumDebug = sourceMap.getStratum("KotlinDebug");
if (stratumDebug == null) {
throw new IllegalArgumentException("No stratumDebug found for KotlinDebug");
stratumDebug = new StratumExt("KotlinDebug");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid emitting mixed mappings for no-debug Kotlin SMAPs

When a Kotlin class has a SourceDebugExtension but omits KotlinDebug (the added f4 case generates SymbolExtraction16$f4$$inlined$groupingBy$1 with SourceFile: _Collections.kt and only a Kotlin stratum), this empty stratum sends every line through the main-stratum fallback. That fallback can map some bytecode lines to the app file while leaving others in the Kotlin library file, but SymbolExtractor still labels the entire scope with classNode.sourceFile, so we now emit nonsensical/mixed file-line ranges instead of just avoiding the exception. Classes with no KotlinDebug need to be skipped or remapped with a consistent source file.

Useful? React with 👍 / 👎.

@pr-commenter

pr-commenter Bot commented Jun 30, 2026

Copy link
Copy Markdown

Debugger benchmarks

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
ci_job_date 1782932735 1782933081
end_time 2026-07-01T19:07:01 2026-07-01T19:12:46
git_branch master jpbempel/fix-kotlindebug
git_commit_sha b710ce8 c05c200
start_time 2026-07-01T19:05:36 2026-07-01T19:11:22
See matching parameters
Baseline Candidate
ci_job_id 1822471212 1822471212
ci_pipeline_id 122200915 122200915
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
git_commit_date 1782932186 1782932186

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
[-29.018µs; +24.817µs] or [-9.747%; +8.336%]
unstable
[-39034.287ns; +40107.522ns] or [-11.484%; +11.800%]
unstable
[-49.872µs; +54.512µs] or [-14.005%; +15.308%]
unstable
[-169.208µs; +64.566µs] or [-13.678%; +5.219%]
same
scenario:basic same same same unstable
[-102.130µs; +121.554µs] or [-9.461%; +11.261%]
unstable
[-218.583op/s; +96.631op/s] or [-8.743%; +3.865%]
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 (339.901 µs) : 309, 371
.   : milestone, 340,
basic (300.528 µs) : 293, 308
.   : milestone, 301,
loop (8.972 ms) : 8967, 8977
.   : milestone, 8972,
section candidate
noprobe (340.438 µs) : 297, 383
.   : milestone, 340,
basic (299.539 µs) : 292, 307
.   : milestone, 300,
loop (8.969 ms) : 8962, 8975
.   : milestone, 8969,
Loading
  • baseline results
Scenario Request median duration [CI 0.99]
noprobe 339.901 µs [308.625 µs, 371.177 µs]
basic 300.528 µs [293.14 µs, 307.916 µs]
loop 8.972 ms [8.967 ms, 8.977 ms]
  • candidate results
Scenario Request median duration [CI 0.99]
noprobe 340.438 µs [297.393 µs, 383.482 µs]
basic 299.539 µs [292.361 µs, 306.717 µs]
loop 8.969 ms [8.962 ms, 8.975 ms]

@jpbempel jpbempel added comp: debugger Dynamic Instrumentation type: bug Bug report and fix labels Jun 30, 2026

@dudikeleti dudikeleti left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Just make sure to address this comment, I can't tell if it's really issue.

@ojung ojung left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can't say I understand how this works, but I'm assuming you test this in staging :)

KotlinDebug stratum in SMAP is not always emitted
if not present make one empty and avoid throwing exception
@jpbempel jpbempel force-pushed the jpbempel/fix-kotlindebug branch from fcb11d1 to 778d4a9 Compare July 1, 2026 18:28
@datadog-official

datadog-official Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 74.38% (+17.43%)

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

@dd-octo-sts

dd-octo-sts Bot commented Jul 1, 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.99 s 13.93 s [-0.3%; +1.1%] (no difference)
startup:insecure-bank:tracing:Agent 12.93 s 12.90 s [-0.5%; +1.1%] (no difference)
startup:petclinic:appsec:Agent 16.82 s 17.25 s [-6.7%; +1.6%] (no difference)
startup:petclinic:iast:Agent 16.82 s 16.97 s [-6.9%; +5.2%] (unstable)
startup:petclinic:profiling:Agent 17.34 s 17.34 s [-1.6%; +1.7%] (no difference)
startup:petclinic:sca:Agent 17.41 s 17.41 s [-1.2%; +1.2%] (no difference)
startup:petclinic:tracing:Agent 16.15 s 16.29 s [-6.7%; +4.9%] (unstable)

Commit: c05c2002 · 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.

@jpbempel jpbempel added this pull request to the merge queue Jul 1, 2026
@dd-octo-sts

dd-octo-sts Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

/merge

@gh-worker-devflow-routing-ef8351

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

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-07-01 19:49:05 UTC ℹ️ Start processing command /merge


2026-07-01 19:49:09 UTC ℹ️ MergeQueue: pull request added to the queue

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


2026-07-01 20:48:12 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 1, 2026
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot merged commit 9775a58 into master Jul 1, 2026
592 checks passed
@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot deleted the jpbempel/fix-kotlindebug branch July 1, 2026 20:48
@github-actions github-actions Bot added this to the 1.64.0 milestone Jul 1, 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: bug Bug report and fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants