-
Notifications
You must be signed in to change notification settings - Fork 140
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
Fix error checking for CallTargetBubbleUpException #5836
Conversation
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing the following branches/commits: 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 shown 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). gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5836) - mean (74ms) : 62, 86
. : milestone, 74,
master - mean (75ms) : 63, 87
. : milestone, 75,
section CallTarget+Inlining+NGEN
This PR (5836) - mean (1,043ms) : 1024, 1061
. : milestone, 1043,
master - mean (1,042ms) : 1022, 1061
. : milestone, 1042,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5836) - mean (109ms) : 106, 113
. : milestone, 109,
master - mean (109ms) : 105, 114
. : milestone, 109,
section CallTarget+Inlining+NGEN
This PR (5836) - mean (730ms) : 709, 751
. : milestone, 730,
master - mean (731ms) : 712, 749
. : milestone, 731,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5836) - mean (92ms) : 88, 97
. : milestone, 92,
master - mean (92ms) : 88, 96
. : milestone, 92,
section CallTarget+Inlining+NGEN
This PR (5836) - mean (679ms) : 654, 703
. : milestone, 679,
master - mean (677ms) : 650, 704
. : milestone, 677,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5836) - mean (192ms) : 189, 196
. : milestone, 192,
master - mean (192ms) : 188, 197
. : milestone, 192,
section CallTarget+Inlining+NGEN
This PR (5836) - mean (1,147ms) : 1123, 1171
. : milestone, 1147,
master - mean (1,145ms) : 1114, 1176
. : milestone, 1145,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5836) - mean (275ms) : 270, 280
. : milestone, 275,
master - mean (277ms) : 272, 282
. : milestone, 277,
section CallTarget+Inlining+NGEN
This PR (5836) - mean (904ms) : 876, 933
. : milestone, 904,
master - mean (907ms) : 874, 939
. : milestone, 907,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5836) - mean (266ms) : 261, 270
. : milestone, 266,
master - mean (267ms) : 262, 271
. : milestone, 267,
section CallTarget+Inlining+NGEN
This PR (5836) - mean (884ms) : 861, 906
. : milestone, 884,
master - mean (884ms) : 861, 907
. : milestone, 884,
|
Datadog ReportBranch report: ✅ 0 Failed, 350536 Passed, 2248 Skipped, 23h 39m 17.67s Total Time New Flaky Tests (1)
|
Benchmarks Report for tracer 🐌Benchmarks for #5836 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.Trace.ActivityBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.SpanBenchmark - Slower
|
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net6.0 | 1.170 | 512.79 | 599.93 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
net6.0 | 431ns | 0.714ns | 2.67ns | 0.00804 | 0 | 0 | 576 B |
master | StartFinishSpan |
netcoreapp3.1 | 577ns | 0.864ns | 3.35ns | 0.00785 | 0 | 0 | 576 B |
master | StartFinishSpan |
net472 | 658ns | 0.773ns | 2.79ns | 0.0915 | 0 | 0 | 578 B |
master | StartFinishScope |
net6.0 | 513ns | 1.18ns | 4.43ns | 0.00983 | 0 | 0 | 696 B |
master | StartFinishScope |
netcoreapp3.1 | 710ns | 0.792ns | 2.96ns | 0.00938 | 0 | 0 | 696 B |
master | StartFinishScope |
net472 | 943ns | 1.03ns | 3.98ns | 0.104 | 0 | 0 | 658 B |
#5836 | StartFinishSpan |
net6.0 | 398ns | 0.0979ns | 0.379ns | 0.00801 | 0 | 0 | 576 B |
#5836 | StartFinishSpan |
netcoreapp3.1 | 566ns | 0.138ns | 0.536ns | 0.00773 | 0 | 0 | 576 B |
#5836 | StartFinishSpan |
net472 | 672ns | 0.616ns | 2.39ns | 0.0916 | 0 | 0 | 578 B |
#5836 | StartFinishScope |
net6.0 | 600ns | 0.164ns | 0.614ns | 0.00964 | 0 | 0 | 696 B |
#5836 | StartFinishScope |
netcoreapp3.1 | 707ns | 0.273ns | 1.06ns | 0.00959 | 0 | 0 | 696 B |
#5836 | StartFinishScope |
net472 | 838ns | 3.9ns | 15.6ns | 0.104 | 0 | 0 | 658 B |
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | RunOnMethodBegin |
net6.0 | 689ns | 0.775ns | 3ns | 0.00962 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 885ns | 1.11ns | 4.28ns | 0.00956 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
net472 | 1.13μs | 0.368ns | 1.43ns | 0.104 | 0 | 0 | 658 B |
#5836 | RunOnMethodBegin |
net6.0 | 658ns | 0.415ns | 1.55ns | 0.00984 | 0 | 0 | 696 B |
#5836 | RunOnMethodBegin |
netcoreapp3.1 | 955ns | 1.12ns | 4.35ns | 0.0091 | 0 | 0 | 696 B |
#5836 | RunOnMethodBegin |
net472 | 1.14μs | 1.15ns | 4.29ns | 0.105 | 0 | 0 | 658 B |
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.
LGTM
## Summary of changes Fix error checking when emitting the CallTargetBubbleUpException code. As a bonus, add synchronization when creating the metadata tokens. ## Reason for change If for some reason we fail to create the metadata tokens, we could create an invalid EH clause, which causes an access violation later on. ## Implementation details Converted the calltarget_tokens mutex to a recursive mutex, because the `EnsureBaseCalltargetTokens` methods call each other. ## Test coverage Hard to test, but coincidentally I discovered that the the added synchronization fixes a crash when running powershell with SentinelOne activated. ## Other details Fixes #5799
## Summary of changes Fix error checking when emitting the CallTargetBubbleUpException code. As a bonus, add synchronization when creating the metadata tokens. ## Reason for change If for some reason we fail to create the metadata tokens, we could create an invalid EH clause, which causes an access violation later on. ## Implementation details Converted the calltarget_tokens mutex to a recursive mutex, because the `EnsureBaseCalltargetTokens` methods call each other. ## Test coverage Hard to test, but coincidentally I discovered that the the added synchronization fixes a crash when running powershell with SentinelOne activated. ## Other details Fixes #5799 Backport of #5836 to v2.
Summary of changes
Fix error checking when emitting the CallTargetBubbleUpException code.
As a bonus, add synchronization when creating the metadata tokens.
Reason for change
If for some reason we fail to create the metadata tokens, we could create an invalid EH clause, which causes an access violation later on.
Implementation details
Converted the calltarget_tokens mutex to a recursive mutex, because the
EnsureBaseCalltargetTokens
methods call each other.Test coverage
Hard to test, but coincidentally I discovered that the the added synchronization fixes a crash when running powershell with SentinelOne activated.
Other details
Fixes #5799