aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectFrame.cpp
diff options
context:
space:
mode:
authorLei Wang <wlei@fb.com>2024-02-19 11:36:20 -0800
committerGitHub <noreply@github.com>2024-02-19 11:36:20 -0800
commitc98da372cb08cd3b3c513a6a86592b0f2892fb49 (patch)
tree8c9be762891fdd44f988769e15f6aa8aa9c7c393 /lldb/source/Commands/CommandObjectFrame.cpp
parent2426055a64e43c5d9126b191ee9836710a223d75 (diff)
downloadllvm-c98da372cb08cd3b3c513a6a86592b0f2892fb49.zip
llvm-c98da372cb08cd3b3c513a6a86592b0f2892fb49.tar.gz
llvm-c98da372cb08cd3b3c513a6a86592b0f2892fb49.tar.bz2
[CSSPGO] Compute and report profile matching recovered callsites and samples (#79090)
This change adds the support to compute and report the staleness metrics after stale profile matching so that we can know how effective the fuzzy matching is, i. e. how many callsites and samples are recovered by the matching. Some implementation notes: - The function checksum mismatch metrics are not applicable here as it's function-level metrics, checksum mismatch remains the same before and after matching, so we need to compute based on the callsite samples. - Added two new counters `NumRecoveredCallsites`, `RecoveredCallsiteSamples` for this and removed `TotalCallsiteSamples` as now the we can use the `TotalFuncHashSamples` as base, and renamed some counters. - In profile matching, we changed to use a state machine to represent the callsite's matching state changes. See the `MatchState` for the state, and used a new function `recordCallsiteMatchStates` to compute and record the callsite's match states changes before and after the matching, , the result is compressed and saved into a `FuncCallsiteMatchStates` map for later counting use. - Changed the counting function to run on module-level and moved it to the end of the whole process(`computeAndReportProfileStaleness`). The reason is before the callsite is only counted on top-level function, this change extends it to count(recursively) on the inlined functions and samples, which is more accurate.
Diffstat (limited to 'lldb/source/Commands/CommandObjectFrame.cpp')
0 files changed, 0 insertions, 0 deletions