[profiler] Refactor linux unwinder and remove unused one#7917
[profiler] Refactor linux unwinder and remove unused one#7917
Conversation
| virtual ~IUnwinder() = default; | ||
|
|
||
| // Returns the number of frames unwound | ||
| virtual std::int32_t Unwind(void* ctx, std::uintptr_t* buffer, std::size_t bufferSize) const = 0; |
There was a problem hiding this comment.
unwinder must be stateless (we will use one for all threads in timer_create-based CPU profiler)
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (7917) 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 (7917) - mean (68ms) : 67, 70
master - mean (69ms) : 67, 70
section Bailout
This PR (7917) - mean (72ms) : 71, 73
master - mean (72ms) : 71, 73
section CallTarget+Inlining+NGEN
This PR (7917) - mean (1,007ms) : 955, 1060
master - mean (1,010ms) : 953, 1066
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 (7917) - mean (106ms) : 104, 108
master - mean (106ms) : 104, 108
section Bailout
This PR (7917) - mean (107ms) : 106, 108
master - mean (107ms) : 106, 108
section CallTarget+Inlining+NGEN
This PR (7917) - mean (710ms) : 681, 738
master - mean (715ms) : 670, 760
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7917) - mean (93ms) : 91, 96
master - mean (93ms) : 91, 95
section Bailout
This PR (7917) - mean (95ms) : 93, 96
master - mean (94ms) : 93, 95
section CallTarget+Inlining+NGEN
This PR (7917) - mean (668ms) : 648, 688
master - mean (667ms) : 646, 689
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7917) - mean (92ms) : 90, 94
master - mean (92ms) : 90, 94
section Bailout
This PR (7917) - mean (93ms) : 92, 94
master - mean (93ms) : 91, 94
section CallTarget+Inlining+NGEN
This PR (7917) - mean (631ms) : 614, 648
master - mean (629ms) : 616, 642
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 (7917) - mean (197ms) : 191, 203
master - mean (194ms) : 190, 197
section Bailout
This PR (7917) - mean (199ms) : 196, 202
master - mean (197ms) : 194, 200
section CallTarget+Inlining+NGEN
This PR (7917) - mean (1,125ms) : 1055, 1196
master - mean (1,114ms) : 1069, 1160
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 (7917) - mean (277ms) : 272, 283
master - mean (277ms) : 272, 281
section Bailout
This PR (7917) - mean (279ms) : 274, 284
master - mean (277ms) : 273, 281
section CallTarget+Inlining+NGEN
This PR (7917) - mean (910ms) : 862, 958
master - mean (916ms) : 868, 963
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7917) - mean (272ms) : 265, 278
master - mean (270ms) : 265, 275
section Bailout
This PR (7917) - mean (272ms) : 267, 276
master - mean (270ms) : 267, 273
section CallTarget+Inlining+NGEN
This PR (7917) - mean (890ms) : 849, 932
master - mean (895ms) : 849, 940
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (7917) - mean (270ms) : 264, 277
master - mean (269ms) : 263, 275
section Bailout
This PR (7917) - mean (270ms) : 267, 274
master - mean (270ms) : 265, 275
section CallTarget+Inlining+NGEN
This PR (7917) - mean (828ms) : 810, 847
master - mean (825ms) : 797, 852
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
BenchmarksBenchmark execution time: 2025-12-18 15:37:04 Comparing candidate commit 23ddb72 in PR branch Found 9 performance improvements and 5 performance regressions! Performance is the same for 159 metrics, 13 unstable metrics. scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net6.0
scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody net6.0
scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs netcoreapp3.1
scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark netcoreapp3.1
scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472
scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net6.0
scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net6.0
scenario:Benchmarks.Trace.HttpClientBenchmark.SendAsync net6.0
scenario:Benchmarks.Trace.RedisBenchmark.SendReceive netcoreapp3.1
scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net6.0
scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net6.0
|
|
chrisnas
left a comment
There was a problem hiding this comment.
LGTM
Maybe remove an unneeded log
profiler/src/ProfilerEngine/Datadog.Profiler.Native/CorProfilerCallback.cpp
Outdated
Show resolved
Hide resolved
4d89e4e to
105e915
Compare
588951f to
23ddb72
Compare
…)" This reverts commit f699e67.
Summary of changes
Extract the unwinder to its class + remove the old manual unwinding (never used)
Reason for change
Implementation details
Test coverage
Current tests are enough.
Other details