[llvm] [CSSPGO] Compute and report profile matching recovered callsites and samples (PR #79090)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 13 09:21:14 PST 2024
================
@@ -444,15 +444,36 @@ class SampleProfileMatcher {
// the profile.
StringMap<LocToLocMap> FuncMappings;
- // Profile mismatching statstics.
+ // Match state for an anchor/callsite.
+ enum class MatchState {
+ Matched = 0,
+ Mismatched = 1,
+ // Stay Matched after profile matching.
+ StayMatched = 2,
+ // Recovered from Mismatched after profile matching.
+ Recovered = 3,
+ Unknown = 32,
+ };
+
+ // For each function, store every callsite and its matching state into this
+ // map, of which each entry is a pair of callsite location and MatchState.
+ // This is used for profile staleness computation and report.
+ StringMap<std::unordered_map<LineLocation, MatchState, LineLocationHash>>
----------------
WenleiHe wrote:
note that StringMap keeps a copy of every string key.
https://github.com/llvm/llvm-project/pull/79090
More information about the llvm-commits
mailing list