Skip to content
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] Prevent StackSamplerLoop from crashing at shutdown #6238

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

gleocadie
Copy link
Collaborator

@gleocadie gleocadie commented Nov 5, 2024

Summary of changes

Make sure the StackSamplerLoop does not crash at shutdown.

Reason for change

StackSamplerLoopManager instance calls Stop on the StackSamplerLoop instance. Which allows to finish and stop the thread.
Then the StackSamplerLoop dtor is call (because the instance is destroyed), and Stop is called a second times. The thread object is not cleanup so not nullptr... so we call join on a non-running thread (join was called on the first call to Stop).

This lead to a crash

 # ChildEBP RetAddr      
00 001ef318 705afdca     KERNELBASE!RaiseException+0x62
01 001ef34c 705ab8e7     Datadog_Profiler_Native!_CxxThrowException+0x66 [D:\a\_work\1\s\src\vctools\crt\vcruntime\src\eh\throw.cpp @ 77] 
02 001ef374 7052a0ae     Datadog_Profiler_Native!std::_Throw_Cpp_error+0x34 [D:\a\_work\1\s\src\vctools\crt\github\stl\src\thread0.cpp @ 35] 
03 001ef38c 7059ff90     Datadog_Profiler_Native!std::thread::join+0x3e [c:\devtools\vstudio\VC\Tools\MSVC\14.37.32822\include\thread @ 125] 
04 001ef3b4 7059fda9     Datadog_Profiler_Native!StackSamplerLoop::StopImpl+0x40 [c:\mnt\profiler\src\ProfilerEngine\Datadog.Profiler.Native\StackSamplerLoop.cpp @ 136] 
05 (Inline) --------     Datadog_Profiler_Native!StackSamplerLoop::{dtor}+0x12 [c:\mnt\profiler\src\ProfilerEngine\Datadog.Profiler.Native\StackSamplerLoop.cpp @ 96] 

Implementation details

  • Move thread ownership from _pThreadLoop to another local variable (will set _pThreadLoop instance to nullptr)
  • Check for nullity and if the thread is joinable

Test coverage

Since we inject the ICorprofilerInfo, it's difficult to make this a unit test. And the integration should catch it but.... never did...

Other details

@gleocadie gleocadie requested a review from a team as a code owner November 5, 2024 16:04
@github-actions github-actions bot added the area:profiler Issues related to the continous-profiler label Nov 5, 2024
Copy link
Contributor

@chrisnas chrisnas left a comment

Choose a reason for hiding this comment

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

LGTM

@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Nov 5, 2024

Datadog Report

Branch report: gleocadie/fix-bug-at-shutdown-stacksamplerloop
Commit report: 51e897a
Test service: dd-trace-dotnet

✅ 0 Failed, 374718 Passed, 2420 Skipped, 16h 19m 46.43s Total Time

@andrewlock
Copy link
Member

andrewlock commented Nov 5, 2024

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:

  • 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).

gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6238) - mean (70ms)  : 68, 71
     .   : milestone, 70,
    master - mean (70ms)  : 68, 71
     .   : milestone, 70,

    section CallTarget+Inlining+NGEN
    This PR (6238) - mean (1,119ms)  : 1097, 1140
     .   : milestone, 1119,
    master - mean (1,116ms)  : 1099, 1133
     .   : milestone, 1116,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6238) - mean (109ms)  : 106, 111
     .   : milestone, 109,
    master - mean (108ms)  : 106, 110
     .   : milestone, 108,

    section CallTarget+Inlining+NGEN
    This PR (6238) - mean (775ms)  : 759, 790
     .   : milestone, 775,
    master - mean (775ms)  : 762, 787
     .   : milestone, 775,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6238) - mean (92ms)  : 90, 93
     .   : milestone, 92,
    master - mean (91ms)  : 90, 93
     .   : milestone, 91,

    section CallTarget+Inlining+NGEN
    This PR (6238) - mean (734ms)  : 716, 752
     .   : milestone, 734,
    master - mean (731ms)  : 716, 746
     .   : milestone, 731,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6238) - mean (189ms)  : 186, 193
     .   : milestone, 189,
    master - mean (191ms)  : 185, 196
     .   : milestone, 191,

    section CallTarget+Inlining+NGEN
    This PR (6238) - mean (1,226ms)  : 1204, 1248
     .   : milestone, 1226,
    master - mean (1,229ms)  : 1208, 1250
     .   : milestone, 1229,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6238) - mean (275ms)  : 272, 278
     .   : milestone, 275,
    master - mean (275ms)  : 270, 280
     .   : milestone, 275,

    section CallTarget+Inlining+NGEN
    This PR (6238) - mean (953ms)  : 938, 968
     .   : milestone, 953,
    master - mean (949ms)  : 934, 964
     .   : milestone, 949,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6238) - mean (264ms)  : 260, 268
     .   : milestone, 264,
    master - mean (264ms)  : 260, 268
     .   : milestone, 264,

    section CallTarget+Inlining+NGEN
    This PR (6238) - mean (937ms)  : 916, 958
     .   : milestone, 937,
    master - mean (935ms)  : 913, 957
     .   : milestone, 935,

Loading

@andrewlock
Copy link
Member

andrewlock commented Nov 5, 2024

Throughput/Crank Report ⚡

Throughput results for AspNetCoreSimpleController comparing the following branches/commits:

Cases where throughput results for the PR are worse than latest master (5% drop or greater), results are shown in red.

Note that these results are based on a single point-in-time result for each branch. For full results, see one of the many, many dashboards!

gantt
    title Throughput Linux x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (6238) (11.156M)   : 0, 11156312
    master (11.088M)   : 0, 11088207
    benchmarks/2.9.0 (11.033M)   : 0, 11032866

    section Automatic
    This PR (6238) (7.346M)   : 0, 7346481
    master (7.158M)   : 0, 7157708
    benchmarks/2.9.0 (7.786M)   : 0, 7785853

    section Trace stats
    master (7.480M)   : 0, 7479543

    section Manual
    master (11.166M)   : 0, 11165777

    section Manual + Automatic
    This PR (6238) (6.739M)   : 0, 6739398
    master (6.594M)   : 0, 6593575

    section DD_TRACE_ENABLED=0
    master (10.250M)   : 0, 10250493

Loading
gantt
    title Throughput Linux arm64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (6238) (9.471M)   : 0, 9471248
    master (9.364M)   : 0, 9363648
    benchmarks/2.9.0 (9.495M)   : 0, 9494821

    section Automatic
    This PR (6238) (6.475M)   : 0, 6474963
    master (6.450M)   : 0, 6450198

    section Trace stats
    master (6.679M)   : 0, 6679205

    section Manual
    master (9.587M)   : 0, 9587094

    section Manual + Automatic
    This PR (6238) (5.913M)   : 0, 5912859
    master (6.057M)   : 0, 6056858

    section DD_TRACE_ENABLED=0
    master (8.809M)   : 0, 8809017

Loading
gantt
    title Throughput Windows x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (6238) (9.834M)   : 0, 9833743
    master (9.954M)   : 0, 9953951
    benchmarks/2.9.0 (10.020M)   : 0, 10019592

    section Automatic
    This PR (6238) (6.193M)   : crit ,0, 6192849
    master (6.558M)   : 0, 6558012
    benchmarks/2.9.0 (7.255M)   : 0, 7255257

    section Trace stats
    master (7.152M)   : 0, 7152123

    section Manual
    master (9.703M)   : 0, 9703448

    section Manual + Automatic
    This PR (6238) (5.945M)   : 0, 5944579
    master (6.043M)   : 0, 6042606

    section DD_TRACE_ENABLED=0
    master (9.169M)   : 0, 9169184

Loading

@andrewlock
Copy link
Member

andrewlock commented Nov 5, 2024

Benchmarks Report for tracer 🐌

Benchmarks for #6238 compared to master:

  • 2 benchmarks are slower, with geometric mean 1.309
  • All benchmarks have the same allocations

The following thresholds were used for comparing the benchmark speeds:

  • Mann–Whitney U test with statistical test for significance of 5%
  • Only results indicating a difference greater than 10% and 0.3 ns are considered.

Allocation changes below 0.5% are ignored.

Benchmark details

Benchmarks.Trace.ActivityBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 8.04μs 45.6ns 316ns 0.0158 0.00394 0 5.61 KB
master StartStopWithChild netcoreapp3.1 9.87μs 53ns 286ns 0.0148 0.00492 0 5.8 KB
master StartStopWithChild net472 16.6μs 54.1ns 209ns 1.05 0.322 0.107 6.21 KB
#6238 StartStopWithChild net6.0 8.07μs 44.2ns 300ns 0.0164 0.00821 0 5.61 KB
#6238 StartStopWithChild netcoreapp3.1 10.2μs 53.6ns 321ns 0.0248 0.00992 0 5.8 KB
#6238 StartStopWithChild net472 16.3μs 30ns 116ns 1.03 0.307 0.105 6.2 KB
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 489μs 330ns 1.19μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 634μs 260ns 1.01μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 849μs 548ns 2.12μs 0.422 0 0 3.3 KB
#6238 WriteAndFlushEnrichedTraces net6.0 474μs 283ns 1.1μs 0 0 0 2.7 KB
#6238 WriteAndFlushEnrichedTraces netcoreapp3.1 648μs 454ns 1.76μs 0 0 0 2.7 KB
#6238 WriteAndFlushEnrichedTraces net472 836μs 225ns 871ns 0.417 0 0 3.3 KB
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendRequest net6.0 201μs 1.19μs 11.9μs 0.207 0 0 18.73 KB
master SendRequest netcoreapp3.1 220μs 1.26μs 8.79μs 0.208 0 0 20.89 KB
master SendRequest net472 0.00193ns 0.000799ns 0.00309ns 0 0 0 0 b
#6238 SendRequest net6.0 197μs 1.11μs 7.79μs 0.197 0 0 18.74 KB
#6238 SendRequest netcoreapp3.1 223μs 1.28μs 10.4μs 0.213 0 0 20.89 KB
#6238 SendRequest net472 0.00309ns 0.000925ns 0.00358ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 556μs 1.91μs 7.39μs 0.551 0 0 41.69 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 675μs 3.38μs 15.5μs 0.342 0 0 41.7 KB
master WriteAndFlushEnrichedTraces net472 905μs 4.34μs 17.9μs 8.27 2.3 0.46 53.33 KB
#6238 WriteAndFlushEnrichedTraces net6.0 567μs 1.71μs 6.16μs 0.556 0 0 41.78 KB
#6238 WriteAndFlushEnrichedTraces netcoreapp3.1 664μs 2.57μs 9.62μs 0.332 0 0 41.77 KB
#6238 WriteAndFlushEnrichedTraces net472 882μs 3.65μs 14.1μs 8.13 2.57 0.428 53.33 KB
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteNonQuery net6.0 1.23μs 1.19ns 4.6ns 0.0141 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 1.78μs 2.45ns 9.5ns 0.0135 0 0 1.02 KB
master ExecuteNonQuery net472 2.12μs 0.982ns 3.81ns 0.156 0.00106 0 987 B
#6238 ExecuteNonQuery net6.0 1.31μs 0.933ns 3.61ns 0.0144 0 0 1.02 KB
#6238 ExecuteNonQuery netcoreapp3.1 1.75μs 0.979ns 3.79ns 0.0131 0 0 1.02 KB
#6238 ExecuteNonQuery net472 2.04μs 2.93ns 11.3ns 0.156 0.00103 0 987 B
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net6.0 1.24μs 1.08ns 4.17ns 0.0138 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.5μs 3.57ns 13.8ns 0.0134 0 0 976 B
master CallElasticsearch net472 2.57μs 1.54ns 5.97ns 0.157 0 0 995 B
master CallElasticsearchAsync net6.0 1.37μs 0.88ns 3.41ns 0.0131 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.66μs 1.12ns 4.2ns 0.0142 0 0 1.02 KB
master CallElasticsearchAsync net472 2.68μs 0.931ns 3.48ns 0.166 0 0 1.05 KB
#6238 CallElasticsearch net6.0 1.36μs 0.721ns 2.7ns 0.0136 0 0 976 B
#6238 CallElasticsearch netcoreapp3.1 1.59μs 2.78ns 10.4ns 0.0135 0 0 976 B
#6238 CallElasticsearch net472 2.63μs 1.23ns 4.43ns 0.158 0 0 995 B
#6238 CallElasticsearchAsync net6.0 1.32μs 0.892ns 3.46ns 0.0132 0 0 952 B
#6238 CallElasticsearchAsync netcoreapp3.1 1.63μs 2.78ns 10.4ns 0.0137 0 0 1.02 KB
#6238 CallElasticsearchAsync net472 2.62μs 1.04ns 4.04ns 0.166 0 0 1.05 KB
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net6.0 1.24μs 0.529ns 2.05ns 0.013 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.67μs 1.34ns 5.18ns 0.0125 0 0 952 B
master ExecuteAsync net472 1.7μs 0.407ns 1.52ns 0.145 0 0 915 B
#6238 ExecuteAsync net6.0 1.37μs 1.06ns 3.97ns 0.0133 0 0 952 B
#6238 ExecuteAsync netcoreapp3.1 1.66μs 1.63ns 6.09ns 0.0124 0 0 952 B
#6238 ExecuteAsync net472 1.8μs 0.514ns 1.99ns 0.145 0 0 915 B
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendAsync net6.0 4.42μs 1.47ns 5.3ns 0.0311 0 0 2.31 KB
master SendAsync netcoreapp3.1 5.23μs 2.26ns 8.47ns 0.0391 0 0 2.85 KB
master SendAsync net472 7.53μs 1.71ns 6.64ns 0.494 0 0 3.12 KB
#6238 SendAsync net6.0 4.47μs 17.9ns 69.5ns 0.0308 0 0 2.31 KB
#6238 SendAsync netcoreapp3.1 5.31μs 7.1ns 27.5ns 0.0373 0 0 2.85 KB
#6238 SendAsync net472 7.58μs 3ns 11.6ns 0.495 0 0 3.12 KB
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 1.44μs 0.887ns 3.44ns 0.023 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.1μs 1.29ns 4.81ns 0.0219 0 0 1.64 KB
master EnrichedLog net472 2.64μs 8.52ns 31.9ns 0.25 0 0 1.57 KB
#6238 EnrichedLog net6.0 1.47μs 0.647ns 2.24ns 0.0234 0 0 1.64 KB
#6238 EnrichedLog netcoreapp3.1 2.28μs 1.18ns 4.43ns 0.0218 0 0 1.64 KB
#6238 EnrichedLog net472 2.72μs 1.77ns 6.87ns 0.249 0 0 1.57 KB
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 116μs 135ns 523ns 0.0578 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 122μs 213ns 824ns 0.0618 0 0 4.28 KB
master EnrichedLog net472 154μs 241ns 934ns 0.694 0.231 0 4.46 KB
#6238 EnrichedLog net6.0 116μs 211ns 818ns 0.0581 0 0 4.28 KB
#6238 EnrichedLog netcoreapp3.1 121μs 91.7ns 331ns 0 0 0 4.28 KB
#6238 EnrichedLog net472 154μs 183ns 708ns 0.694 0.231 0 4.46 KB
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 3.17μs 3ns 11.6ns 0.0301 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 4.07μs 1.98ns 7.42ns 0.0286 0 0 2.2 KB
master EnrichedLog net472 4.94μs 1.69ns 6.54ns 0.321 0 0 2.02 KB
#6238 EnrichedLog net6.0 3.06μs 1.03ns 3.97ns 0.0305 0 0 2.2 KB
#6238 EnrichedLog netcoreapp3.1 3.95μs 2.19ns 8.47ns 0.0298 0 0 2.2 KB
#6238 EnrichedLog net472 4.81μs 1.35ns 5.23ns 0.321 0 0 2.02 KB
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendReceive net6.0 1.32μs 0.684ns 2.65ns 0.0159 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.76μs 1.01ns 3.78ns 0.0157 0 0 1.14 KB
master SendReceive net472 2.08μs 0.55ns 2.13ns 0.183 0 0 1.16 KB
#6238 SendReceive net6.0 1.39μs 0.834ns 3.23ns 0.0162 0 0 1.14 KB
#6238 SendReceive netcoreapp3.1 1.82μs 0.912ns 3.53ns 0.0155 0 0 1.14 KB
#6238 SendReceive net472 2.15μs 0.765ns 2.86ns 0.183 0 0 1.16 KB
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 2.87μs 3.46ns 13.4ns 0.0227 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 3.9μs 2.39ns 8.94ns 0.0215 0 0 1.65 KB
master EnrichedLog net472 4.42μs 1.83ns 7.11ns 0.323 0 0 2.04 KB
#6238 EnrichedLog net6.0 2.95μs 8.2ns 31.8ns 0.0219 0 0 1.6 KB
#6238 EnrichedLog netcoreapp3.1 4.02μs 2.44ns 9.47ns 0.0221 0 0 1.65 KB
#6238 EnrichedLog net472 4.5μs 1.64ns 6.36ns 0.322 0 0 2.04 KB
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #6238

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 1.377 400.08 550.77

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 401ns 0.523ns 2.03ns 0.00812 0 0 576 B
master StartFinishSpan netcoreapp3.1 552ns 0.375ns 1.35ns 0.00762 0 0 576 B
master StartFinishSpan net472 727ns 0.382ns 1.48ns 0.0916 0 0 578 B
master StartFinishScope net6.0 541ns 0.387ns 1.5ns 0.00988 0 0 696 B
master StartFinishScope netcoreapp3.1 683ns 0.91ns 3.53ns 0.00955 0 0 696 B
master StartFinishScope net472 868ns 0.546ns 2.11ns 0.105 0 0 658 B
#6238 StartFinishSpan net6.0 551ns 0.313ns 1.21ns 0.00798 0 0 576 B
#6238 StartFinishSpan netcoreapp3.1 590ns 0.52ns 2.01ns 0.00777 0 0 576 B
#6238 StartFinishSpan net472 749ns 0.451ns 1.75ns 0.0917 0 0 578 B
#6238 StartFinishScope net6.0 570ns 0.382ns 1.43ns 0.00967 0 0 696 B
#6238 StartFinishScope netcoreapp3.1 719ns 0.718ns 2.78ns 0.00927 0 0 696 B
#6238 StartFinishScope net472 904ns 0.548ns 2.12ns 0.104 0 0 658 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Slower ⚠️ Same allocations ✔️

Slower ⚠️ in #6238

Benchmark diff/base Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑netcoreapp3.1 1.245 870.29 1,083.43

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 642ns 0.478ns 1.85ns 0.00974 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 868ns 2.03ns 7.86ns 0.00906 0 0 696 B
master RunOnMethodBegin net472 1.08μs 0.868ns 3.36ns 0.104 0 0 658 B
#6238 RunOnMethodBegin net6.0 583ns 0.731ns 2.83ns 0.00972 0 0 696 B
#6238 RunOnMethodBegin netcoreapp3.1 1.08μs 0.728ns 2.82ns 0.00957 0 0 696 B
#6238 RunOnMethodBegin net472 1.14μs 1.12ns 4.34ns 0.104 0 0 658 B

@gleocadie gleocadie force-pushed the gleocadie/fix-bug-at-shutdown-stacksamplerloop branch 5 times, most recently from 190dcc6 to b22063a Compare November 12, 2024 09:16
@gleocadie gleocadie force-pushed the gleocadie/fix-bug-at-shutdown-stacksamplerloop branch from b22063a to 5255edb Compare November 13, 2024 08:24
@gleocadie gleocadie force-pushed the gleocadie/fix-bug-at-shutdown-stacksamplerloop branch from 5255edb to 51e897a Compare November 13, 2024 09:30
@gleocadie gleocadie merged commit 1faff1a into master Nov 13, 2024
81 of 85 checks passed
@gleocadie gleocadie deleted the gleocadie/fix-bug-at-shutdown-stacksamplerloop branch November 13, 2024 13:51
@github-actions github-actions bot added this to the vNext-v3 milestone Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:profiler Issues related to the continous-profiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants