[llvm] d88a0c7 - [memprof] Rename Inline to IsInlineFrame in YAML (#118901)

via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 5 18:39:06 PST 2024


Author: Kazu Hirata
Date: 2024-12-05T18:39:03-08:00
New Revision: d88a0c7322a42227e45ebc09b98132490d6a67b5

URL: https://github.com/llvm/llvm-project/commit/d88a0c7322a42227e45ebc09b98132490d6a67b5
DIFF: https://github.com/llvm/llvm-project/commit/d88a0c7322a42227e45ebc09b98132490d6a67b5.diff

LOG: [memprof] Rename Inline to IsInlineFrame in YAML (#118901)

This patch makes the YAML field name match the struct field name.

Added: 
    

Modified: 
    llvm/include/llvm/ProfileData/MemProf.h
    llvm/unittests/ProfileData/MemProfTest.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/ProfileData/MemProf.h b/llvm/include/llvm/ProfileData/MemProf.h
index a007baa7f1d51c..51f012cdaed3ac 100644
--- a/llvm/include/llvm/ProfileData/MemProf.h
+++ b/llvm/include/llvm/ProfileData/MemProf.h
@@ -1159,7 +1159,7 @@ template <> struct MappingTraits<memprof::Frame> {
     Io.mapRequired("Function", F.Function);
     Io.mapRequired("LineOffset", F.LineOffset);
     Io.mapRequired("Column", F.Column);
-    Io.mapRequired("Inline", F.IsInlineFrame);
+    Io.mapRequired("IsInlineFrame", F.IsInlineFrame);
 
     // Assert that the definition of Frame matches what we expect.  The
     // structured bindings below detect changes to the number of fields.

diff  --git a/llvm/unittests/ProfileData/MemProfTest.cpp b/llvm/unittests/ProfileData/MemProfTest.cpp
index 99f95dd83e009d..f0567d0707fef0 100644
--- a/llvm/unittests/ProfileData/MemProfTest.cpp
+++ b/llvm/unittests/ProfileData/MemProfTest.cpp
@@ -743,22 +743,22 @@ TEST(MemProf, YAMLParser) {
 - GUID: 0xdeadbeef12345678
   AllocSites:
   - Callstack:
-    - {Function: 0x100, LineOffset: 11, Column: 10, Inline: true}
-    - {Function: 0x200, LineOffset: 22, Column: 20, Inline: false}
+    - {Function: 0x100, LineOffset: 11, Column: 10, IsInlineFrame: true}
+    - {Function: 0x200, LineOffset: 22, Column: 20, IsInlineFrame: false}
     MemInfoBlock:
       AllocCount: 777
       TotalSize: 888
   - Callstack:
-    - {Function: 0x300, LineOffset: 33, Column: 30, Inline: false}
-    - {Function: 0x400, LineOffset: 44, Column: 40, Inline: true}
+    - {Function: 0x300, LineOffset: 33, Column: 30, IsInlineFrame: false}
+    - {Function: 0x400, LineOffset: 44, Column: 40, IsInlineFrame: true}
     MemInfoBlock:
       AllocCount: 666
       TotalSize: 555
   CallSites:
-  - - {Function: 0x500, LineOffset: 55, Column: 50, Inline: true}
-    - {Function: 0x600, LineOffset: 66, Column: 60, Inline: false}
-  - - {Function: 0x700, LineOffset: 77, Column: 70, Inline: true}
-    - {Function: 0x800, LineOffset: 88, Column: 80, Inline: false}
+  - - {Function: 0x500, LineOffset: 55, Column: 50, IsInlineFrame: true}
+    - {Function: 0x600, LineOffset: 66, Column: 60, IsInlineFrame: false}
+  - - {Function: 0x700, LineOffset: 77, Column: 70, IsInlineFrame: true}
+    - {Function: 0x800, LineOffset: 88, Column: 80, IsInlineFrame: false}
 )YAML";
 
   llvm::memprof::YAMLMemProfReader YAMLReader;
@@ -821,7 +821,7 @@ TEST(MemProf, YAMLWriterFrame) {
 
   std::string Out = serializeInYAML(F);
   EXPECT_EQ(Out, R"YAML(---
-{ Function: 11, LineOffset: 22, Column: 33, Inline: true }
+{ Function: 11, LineOffset: 22, Column: 33, IsInlineFrame: true }
 ...
 )YAML");
 }


        


More information about the llvm-commits mailing list