[Profiler] Fix bug in managed code cache#8177
Conversation
BenchmarksBenchmark execution time: 2026-02-16 09:55:24 Comparing candidate commit 9421068 in PR branch Found 8 performance improvements and 6 performance regressions! Performance is the same for 165 metrics, 13 unstable metrics. scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net6.0
scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces netcoreapp3.1
scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody net472
scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472
scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net6.0
scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces netcoreapp3.1
scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice netcoreapp3.1
scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice net6.0
scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark net6.0
scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark netcoreapp3.1
scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472
scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope netcoreapp3.1
scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net472
|
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (8177) 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 (8177) - mean (69ms) : 68, 71
master - mean (69ms) : 68, 71
section Bailout
This PR (8177) - mean (73ms) : 72, 75
master - mean (73ms) : 72, 74
section CallTarget+Inlining+NGEN
This PR (8177) - mean (1,040ms) : 986, 1095
master - mean (1,043ms) : 993, 1093
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 (8177) - mean (116ms) : 113, 119
master - mean (116ms) : 112, 120
section Bailout
This PR (8177) - mean (116ms) : 115, 118
master - mean (117ms) : 115, 118
section CallTarget+Inlining+NGEN
This PR (8177) - mean (771ms) : 707, 835
master - mean (787ms) : 732, 842
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8177) - mean (102ms) : 99, 104
master - mean (102ms) : 99, 105
section Bailout
This PR (8177) - mean (103ms) : 101, 105
master - mean (103ms) : 101, 106
section CallTarget+Inlining+NGEN
This PR (8177) - mean (761ms) : 738, 784
master - mean (767ms) : 743, 791
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8177) - mean (93ms) : 91, 96
master - mean (94ms) : 91, 97
section Bailout
This PR (8177) - mean (95ms) : 93, 97
master - mean (95ms) : 93, 96
section CallTarget+Inlining+NGEN
This PR (8177) - mean (636ms) : 619, 654
master - mean (639ms) : 624, 654
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 (8177) - mean (191ms) : 187, 196
master - mean (191ms) : 188, 194
section Bailout
This PR (8177) - mean (195ms) : 192, 197
master - mean (195ms) : 192, 197
section CallTarget+Inlining+NGEN
This PR (8177) - mean (1,136ms) : 1077, 1195
master - mean (1,137ms) : 1070, 1204
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 (8177) - mean (286ms) : 279, 293
master - mean (285ms) : 281, 290
section Bailout
This PR (8177) - mean (285ms) : 281, 290
master - mean (285ms) : 281, 289
section CallTarget+Inlining+NGEN
This PR (8177) - mean (961ms) : 921, 1002
master - mean (958ms) : 918, 999
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8177) - mean (267ms) : 262, 272
master - mean (267ms) : 263, 271
section Bailout
This PR (8177) - mean (267ms) : 263, 272
master - mean (266ms) : 263, 269
section CallTarget+Inlining+NGEN
This PR (8177) - mean (918ms) : 885, 951
master - mean (917ms) : 882, 951
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8177) - mean (274ms) : 269, 278
master - mean (276ms) : 270, 281
section Bailout
This PR (8177) - mean (276ms) : 270, 281
master - mean (275ms) : 272, 278
section CallTarget+Inlining+NGEN
This PR (8177) - mean (854ms) : 835, 873
master - mean (854ms) : 830, 877
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ee4fb57 to
0127852
Compare
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (8177) 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 (8177) - mean (78ms) : 76, 81
master - mean (79ms) : 77, 81
section Bailout
This PR (8177) - mean (83ms) : 81, 86
master - mean (84ms) : 81, 87
section CallTarget+Inlining+NGEN
This PR (8177) - mean (1,120ms) : 1083, 1157
master - mean (1,124ms) : 1075, 1173
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 (8177) - mean (135ms) : 129, 141
master - mean (136ms) : 132, 140
section Bailout
This PR (8177) - mean (137ms) : 132, 142
master - mean (138ms) : 134, 142
section CallTarget+Inlining+NGEN
This PR (8177) - mean (897ms) : 858, 935
master - mean (897ms) : 859, 936
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8177) - mean (120ms) : 114, 125
master - mean (120ms) : 115, 125
section Bailout
This PR (8177) - mean (121ms) : 116, 125
master - mean (122ms) : 118, 126
section CallTarget+Inlining+NGEN
This PR (8177) - mean (856ms) : 826, 887
master - mean (854ms) : 826, 882
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8177) - mean (117ms) : 113, 121
master - mean (119ms) : 114, 123
section Bailout
This PR (8177) - mean (120ms) : 117, 124
master - mean (120ms) : 118, 123
section CallTarget+Inlining+NGEN
This PR (8177) - mean (762ms) : 742, 782
master - mean (762ms) : 740, 783
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 (8177) - mean (208ms) : 198, 219
master - mean (211ms) : 196, 226
section Bailout
This PR (8177) - mean (214ms) : 200, 227
master - mean (211ms) : 201, 221
section CallTarget+Inlining+NGEN
This PR (8177) - mean (1,222ms) : 1168, 1276
master - mean (1,208ms) : 1143, 1273
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 (8177) - mean (318ms) : 297, 339
master - mean (310ms) : 295, 325
section Bailout
This PR (8177) - mean (316ms) : 297, 334
master - mean (311ms) : 296, 327
section CallTarget+Inlining+NGEN
This PR (8177) - mean (1,050ms) : 992, 1109
master - mean (1,056ms) : 1003, 1110
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8177) - mean (304ms) : 289, 318
master - mean (318ms) : 301, 335
section Bailout
This PR (8177) - mean (305ms) : 296, 315
master - mean (322ms) : 307, 337
section CallTarget+Inlining+NGEN
This PR (8177) - mean (1,040ms) : 994, 1086
master - mean (1,058ms) : 1012, 1104
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8177) - mean (301ms) : 290, 313
master - mean (312ms) : 292, 331
section Bailout
This PR (8177) - mean (303ms) : 292, 313
master - mean (313ms) : 291, 335
section CallTarget+Inlining+NGEN
This PR (8177) - mean (989ms) : 882, 1097
master - mean (1,017ms) : 908, 1126
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2012326 to
bd4926f
Compare
bd4926f to
9421068
Compare
Summary of changes
Fix a bug in the ManagedCodeCache.
Reason for change
This PR introduces the managed code cache. But a bug slipped into it(😱 )
This PR disabled the x86 tests to prevent from blocking others.
This PR fixes the issue.
Implementation details
beginAddress&endAddressactually represent the (module) code range but inclusive:endAddressit the last instruction pointer belonging to the function.containsmust take this into account.Test coverage
Add unit tests
Other details