[Profiler] Improve native unwinding performance on arm64#8689
Conversation
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (8689) 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 (8689) - mean (73ms) : 71, 76
master - mean (74ms) : 71, 77
section Bailout
This PR (8689) - mean (77ms) : 75, 79
master - mean (77ms) : 75, 80
section CallTarget+Inlining+NGEN
This PR (8689) - mean (1,111ms) : 1060, 1162
master - mean (1,106ms) : 1059, 1153
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 (8689) - mean (114ms) : 110, 117
master - mean (114ms) : 109, 119
section Bailout
This PR (8689) - mean (119ms) : 113, 124
master - mean (115ms) : 112, 118
section CallTarget+Inlining+NGEN
This PR (8689) - mean (796ms) : 778, 813
master - mean (793ms) : 770, 817
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8689) - mean (102ms) : 98, 106
master - mean (104ms) : 100, 109
section Bailout
This PR (8689) - mean (105ms) : 100, 109
master - mean (103ms) : 100, 107
section CallTarget+Inlining+NGEN
This PR (8689) - mean (951ms) : 913, 988
master - mean (951ms) : 908, 994
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8689) - mean (99ms) : 95, 103
master - mean (100ms) : 96, 104
section Bailout
This PR (8689) - mean (102ms) : 96, 108
master - mean (104ms) : 100, 109
section CallTarget+Inlining+NGEN
This PR (8689) - mean (827ms) : 783, 871
master - mean (825ms) : 785, 866
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 (8689) - mean (197ms) : 192, 203
master - mean (199ms) : 194, 203
section Bailout
This PR (8689) - mean (201ms) : 197, 205
master - mean (201ms) : 197, 206
section CallTarget+Inlining+NGEN
This PR (8689) - mean (1,197ms) : 1151, 1242
master - mean (1,196ms) : 1159, 1234
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 (8689) - mean (286ms) : 275, 296
master - mean (285ms) : 278, 293
section Bailout
This PR (8689) - mean (286ms) : 280, 293
master - mean (285ms) : 279, 291
section CallTarget+Inlining+NGEN
This PR (8689) - mean (960ms) : 937, 984
master - mean (961ms) : 941, 981
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8689) - mean (278ms) : 272, 284
master - mean (280ms) : 271, 289
section Bailout
This PR (8689) - mean (277ms) : 271, 284
master - mean (281ms) : 273, 289
section CallTarget+Inlining+NGEN
This PR (8689) - mean (1,156ms) : 1112, 1201
master - mean (1,153ms) : 1121, 1185
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8689) - mean (275ms) : 268, 281
master - mean (275ms) : 266, 283
section Bailout
This PR (8689) - mean (275ms) : 270, 281
master - mean (275ms) : 270, 280
section CallTarget+Inlining+NGEN
This PR (8689) - mean (1,034ms) : 999, 1069
master - mean (1,031ms) : 994, 1067
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
BenchmarksBenchmark execution time: 2026-06-08 12:12:02 Comparing candidate commit 448e10c in PR branch Found 0 performance improvements and 1 performance regressions! Performance is the same for 70 metrics, 1 unstable metrics, 57 known flaky benchmarks, 69 flaky benchmarks without significant changes.
|
|
@codex review |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
becb9eb to
ada1341
Compare
9cae872 to
66ba94b
Compare
66ba94b to
79749ee
Compare
Summary of changes
Improve unwinding performance on arm64.
Reason for change
After releasing, we conducted performance tests and saw that unwinding was causing a +50% CPU overhead.

In parallel, we got a report confirming our measurements #8694.

With the improvement brought by this PR, we drastically reduce it
Implementation details
As the flamegraph exposed, the libunwind
get_proc_namefunction was causing troubles. For each instruction pointer, it would parse the/proc/<id>/mapsfile.In this PR, we use the same approach as
dl_iterate_phdr: we listen todlopen/dlcose, build a cache ofproc namesand replace libunwindget_proc_nameby ours.Test coverage
Current tests should still work.
Additional tests on parsing
symtabanddynsym.Other details