Skip to content

Conversation

@dudikeleti
Copy link
Contributor

@dudikeleti dudikeleti commented Nov 19, 2025

Summary of changes

Fixes a bug in the debugger expression parser when compiling expressions with T == object that return value types (e.g. @duration as TimeSpan), causing a runtime error (“Expression of type 'System.TimeSpan' cannot be used for assignment to type 'System.Object'”).

Test coverage

ProbeExpressionParser_ObjectReturnType_AllowsValueTypeResults

@dudikeleti dudikeleti marked this pull request as ready for review November 19, 2025 16:10
@dudikeleti dudikeleti requested a review from a team as a code owner November 19, 2025 16:10
@datadog-datadog-prod-us1

This comment has been minimized.

@dd-trace-dotnet-ci-bot
Copy link

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (7844) and master.

✅ No regressions detected - check the details below

Full Metrics Comparison

FakeDbCommand

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration75.22 ± (74.81 - 75.42) ms76.66 ± (76.10 - 77.11) ms+1.9%✅⬆️
.NET Framework 4.8 - Bailout
duration79.04 ± (79.02 - 79.72) ms80.34 ± (80.58 - 81.61) ms+1.7%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1121.02 ± (1127.17 - 1137.93) ms1128.62 ± (1135.61 - 1148.53) ms+0.7%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms22.94 ± (22.86 - 23.02) ms23.29 ± (23.20 - 23.37) ms+1.5%✅⬆️
process.time_to_main_ms87.88 ± (87.55 - 88.22) ms89.25 ± (88.74 - 89.77) ms+1.6%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.93 ± (10.92 - 10.93) MB10.91 ± (10.90 - 10.91) MB-0.2%
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms23.03 ± (22.95 - 23.11) ms22.98 ± (22.90 - 23.05) ms-0.2%
process.time_to_main_ms90.06 ± (89.69 - 90.43) ms89.42 ± (88.95 - 89.88) ms-0.7%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.97 ± (10.97 - 10.98) MB10.96 ± (10.95 - 10.96) MB-0.1%
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms220.97 ± (219.51 - 222.43) ms222.36 ± (221.17 - 223.55) ms+0.6%✅⬆️
process.time_to_main_ms550.54 ± (549.37 - 551.71) ms553.74 ± (552.30 - 555.18) ms+0.6%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed52.54 ± (52.52 - 52.56) MB52.51 ± (52.49 - 52.53) MB-0.1%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.1%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms22.11 ± (22.05 - 22.18) ms22.14 ± (22.06 - 22.23) ms+0.1%✅⬆️
process.time_to_main_ms78.46 ± (78.11 - 78.81) ms78.05 ± (77.56 - 78.54) ms-0.5%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.62 ± (10.61 - 10.62) MB10.63 ± (10.63 - 10.63) MB+0.1%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms21.61 ± (21.55 - 21.67) ms21.95 ± (21.88 - 22.03) ms+1.6%✅⬆️
process.time_to_main_ms77.44 ± (77.18 - 77.71) ms79.30 ± (78.85 - 79.76) ms+2.4%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.66 ± (10.65 - 10.66) MB10.66 ± (10.66 - 10.66) MB+0.0%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms207.34 ± (206.12 - 208.57) ms209.24 ± (207.75 - 210.73) ms+0.9%✅⬆️
process.time_to_main_ms517.03 ± (516.10 - 517.95) ms517.67 ± (516.52 - 518.81) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed51.63 ± (51.61 - 51.66) MB51.55 ± (51.52 - 51.57) MB-0.2%
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.0%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms19.98 ± (19.92 - 20.04) ms20.12 ± (20.04 - 20.20) ms+0.7%✅⬆️
process.time_to_main_ms75.31 ± (75.03 - 75.59) ms76.07 ± (75.59 - 76.55) ms+1.0%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.69 ± (7.68 - 7.69) MB7.64 ± (7.64 - 7.65) MB-0.6%
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms20.01 ± (19.94 - 20.08) ms20.23 ± (20.16 - 20.30) ms+1.1%✅⬆️
process.time_to_main_ms76.33 ± (76.04 - 76.63) ms78.55 ± (78.13 - 78.98) ms+2.9%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.74 ± (7.73 - 7.74) MB7.70 ± (7.70 - 7.71) MB-0.4%
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms193.28 ± (192.36 - 194.20) ms192.97 ± (191.88 - 194.05) ms-0.2%
process.time_to_main_ms494.33 ± (493.35 - 495.31) ms494.54 ± (493.03 - 496.06) ms+0.0%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed38.88 ± (38.84 - 38.92) MB38.92 ± (38.88 - 38.97) MB+0.1%✅⬆️
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)+0.0%✅⬆️

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration191.59 ± (191.42 - 192.21) ms194.23 ± (194.04 - 194.83) ms+1.4%✅⬆️
.NET Framework 4.8 - Bailout
duration195.01 ± (194.89 - 195.35) ms197.33 ± (197.15 - 197.95) ms+1.2%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1165.85 ± (1170.07 - 1179.54) ms1192.82 ± (1190.22 - 1200.20) ms+2.3%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms189.28 ± (188.77 - 189.79) ms191.02 ± (190.59 - 191.45) ms+0.9%✅⬆️
process.time_to_main_ms81.20 ± (80.91 - 81.48) ms81.92 ± (81.67 - 82.17) ms+0.9%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.11 ± (16.08 - 16.13) MB16.05 ± (16.03 - 16.07) MB-0.3%
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (19 - 20)-1.1%
.NET Core 3.1 - Bailout
process.internal_duration_ms188.27 ± (187.95 - 188.60) ms188.78 ± (188.34 - 189.21) ms+0.3%✅⬆️
process.time_to_main_ms82.04 ± (81.89 - 82.19) ms82.40 ± (82.25 - 82.55) ms+0.4%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.18 ± (16.15 - 16.21) MB16.12 ± (16.10 - 16.15) MB-0.4%
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (20 - 21)-0.3%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms395.22 ± (392.70 - 397.73) ms398.07 ± (395.62 - 400.52) ms+0.7%✅⬆️
process.time_to_main_ms517.06 ± (516.38 - 517.74) ms523.51 ± (522.47 - 524.55) ms+1.2%✅⬆️
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed62.65 ± (62.50 - 62.81) MB63.15 ± (63.02 - 63.27) MB+0.8%✅⬆️
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 30)+0.1%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms199.16 ± (198.70 - 199.61) ms194.53 ± (194.01 - 195.05) ms-2.3%
process.time_to_main_ms72.35 ± (72.15 - 72.55) ms70.55 ± (70.34 - 70.77) ms-2.5%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.24 ± (16.21 - 16.26) MB16.35 ± (16.30 - 16.41) MB+0.7%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-1.4%
.NET 6 - Bailout
process.internal_duration_ms196.07 ± (195.60 - 196.55) ms194.55 ± (194.05 - 195.05) ms-0.8%
process.time_to_main_ms72.41 ± (72.21 - 72.61) ms71.82 ± (71.63 - 72.02) ms-0.8%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.33 ± (16.30 - 16.35) MB16.33 ± (16.26 - 16.39) MB+0.0%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)-1.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms417.74 ± (414.56 - 420.93) ms411.38 ± (408.72 - 414.03) ms-1.5%
process.time_to_main_ms490.03 ± (489.34 - 490.73) ms486.92 ± (486.11 - 487.73) ms-0.6%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed62.31 ± (62.18 - 62.45) MB62.18 ± (62.03 - 62.32) MB-0.2%
runtime.dotnet.threads.count29 ± (29 - 30)29 ± (29 - 30)-0.0%
.NET 8 - Baseline
process.internal_duration_ms190.88 ± (190.49 - 191.27) ms192.96 ± (192.51 - 193.40) ms+1.1%✅⬆️
process.time_to_main_ms69.32 ± (69.11 - 69.53) ms69.94 ± (69.77 - 70.11) ms+0.9%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.73 ± (11.70 - 11.76) MB11.69 ± (11.67 - 11.71) MB-0.3%
runtime.dotnet.threads.count18 ± (18 - 18)18 ± (18 - 18)-0.3%
.NET 8 - Bailout
process.internal_duration_ms188.72 ± (188.49 - 188.95) ms191.25 ± (190.90 - 191.60) ms+1.3%✅⬆️
process.time_to_main_ms70.01 ± (69.91 - 70.10) ms71.03 ± (70.83 - 71.24) ms+1.5%✅⬆️
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.70 ± (11.62 - 11.78) MB11.81 ± (11.79 - 11.83) MB+0.9%✅⬆️
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)+1.1%✅⬆️
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms363.28 ± (361.74 - 364.82) ms364.95 ± (363.61 - 366.30) ms+0.5%✅⬆️
process.time_to_main_ms465.13 ± (464.52 - 465.74) ms463.02 ± (462.30 - 463.73) ms-0.5%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed50.27 ± (50.23 - 50.31) MB50.36 ± (50.33 - 50.39) MB+0.2%✅⬆️
runtime.dotnet.threads.count29 ± (29 - 29)29 ± (29 - 29)-0.6%
Comparison explanation

Execution-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:

  • Welch test with statistical test for significance of 5%
  • Only results indicating a difference greater than 5% and 5 ms are considered.

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 charts
FakeDbCommand (.NET Framework 4.8)
gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7844) - mean (77ms)  : 69, 84
    master - mean (75ms)  : 71, 79

    section Bailout
    This PR (7844) - mean (81ms)  : 73, 89
    master - mean (79ms)  : 74, 84

    section CallTarget+Inlining+NGEN
    This PR (7844) - mean (1,142ms)  : 1044, 1240
    master - mean (1,133ms)  : 1053, 1212

Loading
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 (7844) - mean (120ms)  : 112, 129
    master - mean (118ms)  : 112, 125

    section Bailout
    This PR (7844) - mean (120ms)  : 110, 130
    master - mean (121ms)  : 113, 128

    section CallTarget+Inlining+NGEN
    This PR (7844) - mean (808ms)  : 772, 844
    master - mean (814ms)  : 781, 848

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7844) - mean (107ms)  : 98, 117
    master - mean (108ms)  : 102, 114

    section Bailout
    This PR (7844) - mean (108ms)  : 99, 118
    master - mean (106ms)  : 100, 112

    section CallTarget+Inlining+NGEN
    This PR (7844) - mean (761ms)  : 716, 805
    master - mean (757ms)  : 721, 792

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7844) - mean (105ms)  : 96, 114
    master - mean (104ms)  : 99, 109

    section Bailout
    This PR (7844) - mean (107ms)  : 100, 115
    master - mean (105ms)  : 99, 111

    section CallTarget+Inlining+NGEN
    This PR (7844) - mean (719ms)  : 679, 759
    master - mean (725ms)  : 694, 757

Loading
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 (7844) - mean (194ms)  : 190, 199
    master - mean (192ms)  : 188, 196

    section Bailout
    This PR (7844) - mean (198ms)  : 194, 201
    master - mean (195ms)  : 193, 197

    section CallTarget+Inlining+NGEN
    This PR (7844) - mean (1,195ms)  : 1121, 1270
    master - mean (1,175ms)  : 1102, 1248

Loading
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 (7844) - mean (281ms)  : 272, 291
    master - mean (279ms)  : 271, 287

    section Bailout
    This PR (7844) - mean (280ms)  : 272, 287
    master - mean (278ms)  : 274, 283

    section CallTarget+Inlining+NGEN
    This PR (7844) - mean (957ms)  : 901, 1012
    master - mean (944ms)  : 898, 991

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7844) - mean (273ms)  : 267, 280
    master - mean (280ms)  : 272, 289

    section Bailout
    This PR (7844) - mean (275ms)  : 263, 287
    master - mean (277ms)  : 269, 284

    section CallTarget+Inlining+NGEN
    This PR (7844) - mean (930ms)  : 884, 976
    master - mean (937ms)  : 888, 987

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (7844) - mean (273ms)  : 265, 280
    master - mean (270ms)  : 263, 277

    section Bailout
    This PR (7844) - mean (272ms)  : 263, 281
    master - mean (268ms)  : 265, 271

    section CallTarget+Inlining+NGEN
    This PR (7844) - mean (860ms)  : 835, 885
    master - mean (859ms)  : 840, 878

Loading

Copy link
Contributor

@GreenMatan GreenMatan left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants