-
Notifications
You must be signed in to change notification settings - Fork 145
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
[Profiler] Signal-based profiler/Non-Signal-based: prevent deadlock #5812
[Profiler] Signal-based profiler/Non-Signal-based: prevent deadlock #5812
Conversation
Datadog ReportBranch report: ✅ 0 Failed, 343849 Passed, 2064 Skipped, 16h 53m 3.35s Total Time ⌛ Performance Regressions vs Default Branch (14)
|
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 (5812) - mean (73ms) : 63, 84
. : milestone, 73,
master - mean (72ms) : 64, 79
. : milestone, 72,
section CallTarget+Inlining+NGEN
This PR (5812) - mean (1,027ms) : 1003, 1052
. : milestone, 1027,
master - mean (1,072ms) : 1045, 1098
. : milestone, 1072,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5812) - mean (110ms) : 106, 113
. : milestone, 110,
master - mean (109ms) : 105, 113
. : milestone, 109,
section CallTarget+Inlining+NGEN
This PR (5812) - mean (717ms) : 695, 738
. : milestone, 717,
master - mean (747ms) : 729, 764
. : milestone, 747,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5812) - mean (92ms) : 89, 95
. : milestone, 92,
master - mean (92ms) : 89, 94
. : milestone, 92,
section CallTarget+Inlining+NGEN
This PR (5812) - mean (672ms) : 648, 696
. : milestone, 672,
master - mean (704ms) : 677, 730
. : milestone, 704,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5812) - mean (193ms) : 190, 196
. : milestone, 193,
master - mean (192ms) : 189, 194
. : milestone, 192,
section CallTarget+Inlining+NGEN
This PR (5812) - mean (1,132ms) : 1113, 1150
. : milestone, 1132,
master - mean (1,169ms) : 1144, 1195
. : milestone, 1169,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5812) - mean (277ms) : 272, 281
. : milestone, 277,
master - mean (276ms) : 272, 281
. : milestone, 276,
section CallTarget+Inlining+NGEN
This PR (5812) - mean (890ms) : 858, 923
. : milestone, 890,
master - mean (914ms) : 896, 933
. : milestone, 914,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (5812) - mean (267ms) : 263, 271
. : milestone, 267,
master - mean (265ms) : 260, 270
. : milestone, 265,
section CallTarget+Inlining+NGEN
This PR (5812) - mean (873ms) : 849, 896
. : milestone, 873,
master - mean (901ms) : 879, 922
. : milestone, 901,
|
Benchmarks Report for tracer 🐌Benchmarks for #5812 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 - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.TraceAnnotationsBenchmark - Slower
|
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0 | 1.167 | 616.78 | 719.96 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | RunOnMethodBegin |
net6.0 | 617ns | 0.161ns | 0.623ns | 0.00981 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 889ns | 0.454ns | 1.76ns | 0.00931 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
net472 | 1.16μs | 0.259ns | 0.935ns | 0.104 | 0 | 0 | 658 B |
#5812 | RunOnMethodBegin |
net6.0 | 720ns | 0.465ns | 1.8ns | 0.00975 | 0 | 0 | 696 B |
#5812 | RunOnMethodBegin |
netcoreapp3.1 | 984ns | 2.55ns | 9.87ns | 0.00939 | 0 | 0 | 696 B |
#5812 | RunOnMethodBegin |
net472 | 1.08μs | 0.411ns | 1.59ns | 0.104 | 0 | 0 | 658 B |
1ad93b5
to
915580c
Compare
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 - same as #5808
Summary of changes
Prevent deadlock betwen signal-based profilers (walltime/manual cpu profilers) and non-signal based profilers (exception, contention....)
Reason for change
When an exception occurs, the thread can be interrupted by a signal-based profiler (walltime/manual cpu). It can be interrupted while holding the lock used to update the
dl-iterate-phdr
cache.Implementation details
Test coverage
Other details