[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:14:57 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,
----------------
WenleiHe wrote:

A minor inconsistency here as to what we want to cover in the state enum -- Recovered is a state change, StayMatched is a non-change. Do we describe state change or just state in the enum?

If we just describe state:
InitialMatch,
InitialMismatch,
FinalMatch,
FinalMismatch

If we describe state change
InitialMatch,
InitialMismatch,
RecoveredMismatch,  (From initial mismatch to final match)
RemovedMatch (from initial match to final mismatch)

It'd be great if this can be improved, but not a deal breaker if the current state values are very convenient for implementation. 


 

https://github.com/llvm/llvm-project/pull/79090


More information about the llvm-commits mailing list