diff options
author | Snehasish Kumar <snehasishk@google.com> | 2023-08-29 18:58:39 +0000 |
---|---|---|
committer | Snehasish Kumar <snehasishk@google.com> | 2023-08-29 20:45:39 +0000 |
commit | 0edc32fda5a75c6ea8719f709baa3ad493942512 (patch) | |
tree | b2b4fc36311eac773fb89bb3e1142818d4ba338a /llvm/unittests/ProfileData/MemProfTest.cpp | |
parent | b6316294be01e7b332e6fdb88ce8de5c9a98af8c (diff) | |
download | llvm-0edc32fda5a75c6ea8719f709baa3ad493942512.zip llvm-0edc32fda5a75c6ea8719f709baa3ad493942512.tar.gz llvm-0edc32fda5a75c6ea8719f709baa3ad493942512.tar.bz2 |
[memprof] Canonicalize the function name prior to hashing.
Canonicalize the function name (strip suffixes etc) to ensure that
function name suffixes added by late stage passes do not cause
mismatches when memprof profile data is consumed.
Reviewed By: tejohnson
Differential Revision: https://reviews.llvm.org/D159132
Diffstat (limited to 'llvm/unittests/ProfileData/MemProfTest.cpp')
-rw-r--r-- | llvm/unittests/ProfileData/MemProfTest.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/unittests/ProfileData/MemProfTest.cpp b/llvm/unittests/ProfileData/MemProfTest.cpp index 840ba8e..8c01e4d 100644 --- a/llvm/unittests/ProfileData/MemProfTest.cpp +++ b/llvm/unittests/ProfileData/MemProfTest.cpp @@ -99,7 +99,7 @@ const DILineInfoSpecifier specifier() { MATCHER_P4(FrameContains, FunctionName, LineOffset, Column, Inline, "") { const Frame &F = arg; - const uint64_t ExpectedHash = llvm::Function::getGUID(FunctionName); + const uint64_t ExpectedHash = IndexedMemProfRecord::getGUID(FunctionName); if (F.Function != ExpectedHash) { *result_listener << "Hash mismatch"; return false; @@ -147,7 +147,7 @@ TEST(MemProf, FillsValue) { specifier(), false)) .Times(1) .WillRepeatedly(Return(makeInliningInfo({ - {"xyz", 10, 5, 30}, + {"xyz.llvm.123", 10, 5, 30}, {"abc", 10, 5, 30}, }))); |