[Dynamic instrumentation] DEBUG-3374 support @key and @value in EL hash iteration#8511
[Dynamic instrumentation] DEBUG-3374 support @key and @value in EL hash iteration#8511dudikeleti merged 2 commits intomasterfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 17db35d614
ℹ️ 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".
| if (typeof(IDictionary).IsAssignableFrom(sourceType)) | ||
| { | ||
| return typeof(DictionaryEntry); | ||
| } |
There was a problem hiding this comment.
Handle non-generic dictionaries in the predicate path
For non-generic dictionary inputs such as Hashtable/IDictionary, this new branch is never reached: Predicate first rejects the source with IsSafeCollection, and IsCollection only recognizes generic collection interfaces. That means any(ref HashtableLocal, { @key == ... }) is compiled as a default-true condition with an error instead of evaluating the entries, despite the added DictionaryEntry path; the source also needs to be allowed/cast into an IEnumerable<DictionaryEntry> path before invoking LINQ.
Useful? React with 👍 / 👎.
BenchmarksBenchmark execution time: 2026-04-28 13:23:12 Comparing candidate commit 5b2d11a in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 27 metrics, 0 unstable metrics, 58 known flaky benchmarks, 29 flaky benchmarks without significant changes.
|
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (8511) 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 (8511) - mean (75ms) : 70, 79
master - mean (76ms) : 71, 80
section Bailout
This PR (8511) - mean (78ms) : 75, 80
master - mean (78ms) : 75, 81
section CallTarget+Inlining+NGEN
This PR (8511) - mean (1,075ms) : 1033, 1118
master - mean (1,082ms) : 1028, 1136
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 (8511) - mean (116ms) : 110, 123
master - mean (118ms) : 112, 123
section Bailout
This PR (8511) - mean (115ms) : 112, 118
master - mean (115ms) : 113, 118
section CallTarget+Inlining+NGEN
This PR (8511) - mean (779ms) : 746, 812
master - mean (778ms) : 750, 806
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8511) - mean (105ms) : 98, 111
master - mean (104ms) : 98, 109
section Bailout
This PR (8511) - mean (103ms) : 98, 108
master - mean (102ms) : 100, 104
section CallTarget+Inlining+NGEN
This PR (8511) - mean (940ms) : 909, 970
master - mean (938ms) : 899, 977
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8511) - mean (101ms) : 97, 104
master - mean (100ms) : 97, 104
section Bailout
This PR (8511) - mean (105ms) : 99, 111
master - mean (106ms) : 101, 110
section CallTarget+Inlining+NGEN
This PR (8511) - mean (821ms) : 780, 862
master - mean (820ms) : 778, 862
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 (8511) - mean (205ms) : 196, 214
master - mean (203ms) : 196, 209
section Bailout
This PR (8511) - mean (209ms) : 200, 218
master - mean (206ms) : 198, 213
section CallTarget+Inlining+NGEN
This PR (8511) - mean (1,205ms) : 1148, 1262
master - mean (1,193ms) : 1126, 1259
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 (8511) - mean (294ms) : 278, 310
master - mean (286ms) : 278, 295
section Bailout
This PR (8511) - mean (296ms) : 282, 311
master - mean (288ms) : 280, 297
section CallTarget+Inlining+NGEN
This PR (8511) - mean (963ms) : 934, 992
master - mean (936ms) : 911, 962
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8511) - mean (288ms) : 272, 303
master - mean (279ms) : 268, 289
section Bailout
This PR (8511) - mean (285ms) : 274, 297
master - mean (279ms) : 268, 290
section CallTarget+Inlining+NGEN
This PR (8511) - mean (1,160ms) : 1116, 1203
master - mean (1,147ms) : 1104, 1191
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8511) - mean (289ms) : 276, 301
master - mean (279ms) : 268, 289
section Bailout
This PR (8511) - mean (287ms) : 275, 299
master - mean (282ms) : 272, 293
section CallTarget+Inlining+NGEN
This PR (8511) - mean (1,082ms) : 963, 1200
master - mean (1,040ms) : 996, 1085
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
17db35d to
5b2d11a
Compare
Summary of changes
Add
@keyand@valueiterator tokens to the debugger expression language for dictionary/hash iteration.Reason for change
@itfor collection iteration, but it could not express dictionary entry predicates using key/value semantics.Implementation details
KeyValuePair<TKey, TValue>for generic dictionaries andDictionaryEntryfor non-genericIDictionaryimplementations.@keyand@valueare only valid inside dictionary-entry iteration; outside that context they fall back to the existing undefined/error behavior.and/or, which is required for combined predicates inside collection lambdas.any(filter(ref DictionaryLocal, { @key == 'hello' }), { @value == 'world' })any(ref DictionaryLocal, { @key == 'hello' && @value == 'world' })Test coverage
DebuggerExpressionLanguageTests.TestConditionsDebuggerExpressionLanguageTests.TestConditions