-
Notifications
You must be signed in to change notification settings - Fork 151
[SymDB] DEBUG-4512 Sanitize hoisted 'this' name in symbol upload #8100
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
[SymDB] DEBUG-4512 Sanitize hoisted 'this' name in symbol upload #8100
Conversation
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6be62058d3
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
tracer/src/Datadog.Trace/Debugger/Symbols/SymbolPdbExtractor.cs
Outdated
Show resolved
Hide resolved
BenchmarksBenchmark execution time: 2026-01-27 11:09:22 Comparing candidate commit 1106104 in PR branch Found 7 performance improvements and 9 performance regressions! Performance is the same for 158 metrics, 18 unstable metrics. scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody net6.0
scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs netcoreapp3.1
scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest netcoreapp3.1
scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472
scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces netcoreapp3.1
scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net472
scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch netcoreapp3.1
scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472
scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync netcoreapp3.1
scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net6.0
scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net6.0
scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes netcoreapp3.1
scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net6.0
|
6be6205 to
b33c280
Compare
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (8100) and master. ✅ No regressions detected - check the details below Full Metrics ComparisonFakeDbCommand
HttpMessageHandler
Comparison explanationExecution-time benchmarks measure the whole time it takes to execute a program, and are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are highlighted in **red**. The following thresholds were used for comparing the execution times:
Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard. Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph). Duration chartsFakeDbCommand (.NET Framework 4.8)gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8100) - mean (69ms) : 67, 70
master - mean (68ms) : 67, 70
section Bailout
This PR (8100) - mean (72ms) : 71, 74
master - mean (72ms) : 72, 73
section CallTarget+Inlining+NGEN
This PR (8100) - mean (1,020ms) : 936, 1103
master - mean (1,020ms) : 931, 1109
FakeDbCommand (.NET Core 3.1)gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8100) - mean (106ms) : 103, 108
master - mean (106ms) : 103, 108
section Bailout
This PR (8100) - mean (107ms) : 106, 108
master - mean (107ms) : 106, 108
section CallTarget+Inlining+NGEN
This PR (8100) - mean (744ms) : 689, 798
master - mean (734ms) : 673, 795
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8100) - mean (94ms) : 92, 96
master - mean (94ms) : 92, 96
section Bailout
This PR (8100) - mean (95ms) : 94, 96
master - mean (94ms) : 93, 95
section CallTarget+Inlining+NGEN
This PR (8100) - mean (715ms) : 680, 750
master - mean (719ms) : 686, 753
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8100) - mean (93ms) : 90, 95
master - mean (92ms) : 90, 94
section Bailout
This PR (8100) - mean (94ms) : 92, 95
master - mean (93ms) : 92, 94
section CallTarget+Inlining+NGEN
This PR (8100) - mean (635ms) : 621, 649
master - mean (637ms) : 618, 655
HttpMessageHandler (.NET Framework 4.8)gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8100) - mean (194ms) : 190, 199
master - mean (195ms) : 190, 199
section Bailout
This PR (8100) - mean (198ms) : 194, 202
master - mean (197ms) : 195, 200
section CallTarget+Inlining+NGEN
This PR (8100) - mean (1,139ms) : 1059, 1219
master - mean (1,130ms) : 1063, 1197
HttpMessageHandler (.NET Core 3.1)gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8100) - mean (286ms) : 280, 292
master - mean (280ms) : 272, 288
section Bailout
This PR (8100) - mean (282ms) : 274, 290
master - mean (278ms) : 275, 281
section CallTarget+Inlining+NGEN
This PR (8100) - mean (937ms) : 896, 979
master - mean (940ms) : 905, 976
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8100) - mean (271ms) : 266, 276
master - mean (271ms) : 266, 277
section Bailout
This PR (8100) - mean (271ms) : 267, 275
master - mean (271ms) : 267, 274
section CallTarget+Inlining+NGEN
This PR (8100) - mean (920ms) : 863, 978
master - mean (919ms) : 868, 969
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8100) - mean (271ms) : 264, 278
master - mean (270ms) : 264, 276
section Bailout
This PR (8100) - mean (270ms) : 267, 274
master - mean (270ms) : 266, 275
section CallTarget+Inlining+NGEN
This PR (8100) - mean (835ms) : 813, 856
master - mean (834ms) : 812, 856
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
…static methods correctly
b33c280 to
1106104
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
## Summary of changes Prevented compiler-generated async/closure implementation types (e.g. `+<DoAsyncWork>d__3`, `+<>c__DisplayClass`…) from leaking into Live Debugger symbols by sanitizing the implicit `this` argument type for closure scopes to the user-declared declaring type. ## Reason for change Customers see confusing symbol entries containing <>/<…>d__… and other compiler artifacts in symbol search results. These are valid CLR metadata names but are not meaningful to users and clutter the Live Debugger UI. ## Test coverage Updated existing SymbolExtractorTest Verify approval snapshots to reflect the sanitized this type in closure scopes. ## Follow-ups If customers still see compiler-generated names from other symbol fields (e.g., local variable), we can add additional targeted sanitization rules with explicit replacements.
Summary of changes
Prevented compiler-generated async/closure implementation types (e.g.
+<DoAsyncWork>d__3,+<>c__DisplayClass…) from leaking into Live Debugger symbols by sanitizing the implicitthisargument type for closure scopes to the user-declared declaring type.Reason for change
Customers see confusing symbol entries containing <>/<…>d__… and other compiler artifacts in symbol search results. These are valid CLR metadata names but are not meaningful to users and clutter the Live Debugger UI.
Test coverage
Updated existing SymbolExtractorTest Verify approval snapshots to reflect the sanitized this type in closure scopes.
Follow-ups
If customers still see compiler-generated names from other symbol fields (e.g., local variable), we can add additional targeted sanitization rules with explicit replacements.