[llvm] [memprof] Rename Inline to IsInlineFrame in YAML (PR #118901)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 5 16:13:10 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-pgo
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
This patch makes the YAML field name match the struct field name.
---
Full diff: https://github.com/llvm/llvm-project/pull/118901.diff
2 Files Affected:
- (modified) llvm/include/llvm/ProfileData/MemProf.h (+1-1)
- (modified) llvm/unittests/ProfileData/MemProfTest.cpp (+9-9)
``````````diff
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");
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/118901
More information about the llvm-commits
mailing list