[llvm] [MC][NFC] Fix typo in MCPseudoProbeFrameLocation (PR #98090)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 8 15:34:35 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mc

Author: Amir Ayupov (aaupov)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/98090.diff


3 Files Affected:

- (modified) llvm/include/llvm/MC/MCPseudoProbe.h (+3-3) 
- (modified) llvm/lib/MC/MCPseudoProbe.cpp (+5-5) 
- (modified) llvm/tools/llvm-profgen/ProfiledBinary.h (+1-1) 


``````````diff
diff --git a/llvm/include/llvm/MC/MCPseudoProbe.h b/llvm/include/llvm/MC/MCPseudoProbe.h
index 7d91c5f7d6136..4d82da70f3df8 100644
--- a/llvm/include/llvm/MC/MCPseudoProbe.h
+++ b/llvm/include/llvm/MC/MCPseudoProbe.h
@@ -174,7 +174,7 @@ class MCPseudoProbe : public MCPseudoProbeBase {
 };
 
 // Represents a callsite with caller function name and probe id
-using MCPseduoProbeFrameLocation = std::pair<StringRef, uint32_t>;
+using MCPseudoProbeFrameLocation = std::pair<StringRef, uint32_t>;
 
 class MCDecodedPseudoProbe : public MCPseudoProbeBase {
   uint64_t Address;
@@ -199,7 +199,7 @@ class MCDecodedPseudoProbe : public MCPseudoProbeBase {
   // each tree node has its InlineSite which is taken as the context.
   // \p ContextStack is populated in root to leaf order
   void
-  getInlineContext(SmallVectorImpl<MCPseduoProbeFrameLocation> &ContextStack,
+  getInlineContext(SmallVectorImpl<MCPseudoProbeFrameLocation> &ContextStack,
                    const GUIDProbeFunctionMap &GUID2FuncMAP) const;
 
   // Helper function to get the string from context stack
@@ -404,7 +404,7 @@ class MCPseudoProbeDecoder {
   //  IncludeLeaf = false, Output: [main:1, foo:2]
   void getInlineContextForProbe(
       const MCDecodedPseudoProbe *Probe,
-      SmallVectorImpl<MCPseduoProbeFrameLocation> &InlineContextStack,
+      SmallVectorImpl<MCPseudoProbeFrameLocation> &InlineContextStack,
       bool IncludeLeaf) const;
 
   const AddressProbesMap &getAddress2ProbesMap() const {
diff --git a/llvm/lib/MC/MCPseudoProbe.cpp b/llvm/lib/MC/MCPseudoProbe.cpp
index db0443dd54356..a5a030e19b849 100644
--- a/llvm/lib/MC/MCPseudoProbe.cpp
+++ b/llvm/lib/MC/MCPseudoProbe.cpp
@@ -280,7 +280,7 @@ void MCPseudoProbeFuncDesc::print(raw_ostream &OS) {
 }
 
 void MCDecodedPseudoProbe::getInlineContext(
-    SmallVectorImpl<MCPseduoProbeFrameLocation> &ContextStack,
+    SmallVectorImpl<MCPseudoProbeFrameLocation> &ContextStack,
     const GUIDProbeFunctionMap &GUID2FuncMAP) const {
   uint32_t Begin = ContextStack.size();
   MCDecodedPseudoProbeInlineTree *Cur = InlineTree;
@@ -289,7 +289,7 @@ void MCDecodedPseudoProbe::getInlineContext(
   while (Cur->hasInlineSite()) {
     StringRef FuncName = getProbeFNameForGUID(GUID2FuncMAP, Cur->Parent->Guid);
     ContextStack.emplace_back(
-        MCPseduoProbeFrameLocation(FuncName, std::get<1>(Cur->ISite)));
+        MCPseudoProbeFrameLocation(FuncName, std::get<1>(Cur->ISite)));
     Cur = static_cast<MCDecodedPseudoProbeInlineTree *>(Cur->Parent);
   }
   // Make the ContextStack in caller-callee order
@@ -299,7 +299,7 @@ void MCDecodedPseudoProbe::getInlineContext(
 std::string MCDecodedPseudoProbe::getInlineContextStr(
     const GUIDProbeFunctionMap &GUID2FuncMAP) const {
   std::ostringstream OContextStr;
-  SmallVector<MCPseduoProbeFrameLocation, 16> ContextStack;
+  SmallVector<MCPseudoProbeFrameLocation, 16> ContextStack;
   getInlineContext(ContextStack, GUID2FuncMAP);
   for (auto &Cxt : ContextStack) {
     if (OContextStr.str().size())
@@ -616,7 +616,7 @@ MCPseudoProbeDecoder::getFuncDescForGUID(uint64_t GUID) const {
 
 void MCPseudoProbeDecoder::getInlineContextForProbe(
     const MCDecodedPseudoProbe *Probe,
-    SmallVectorImpl<MCPseduoProbeFrameLocation> &InlineContextStack,
+    SmallVectorImpl<MCPseudoProbeFrameLocation> &InlineContextStack,
     bool IncludeLeaf) const {
   Probe->getInlineContext(InlineContextStack, GUID2FuncDescMap);
   if (!IncludeLeaf)
@@ -625,7 +625,7 @@ void MCPseudoProbeDecoder::getInlineContextForProbe(
   // hence we need to retrieve and prepend leaf if requested.
   const auto *FuncDesc = getFuncDescForGUID(Probe->getGuid());
   InlineContextStack.emplace_back(
-      MCPseduoProbeFrameLocation(FuncDesc->FuncName, Probe->getIndex()));
+      MCPseudoProbeFrameLocation(FuncDesc->FuncName, Probe->getIndex()));
 }
 
 const MCPseudoProbeFuncDesc *MCPseudoProbeDecoder::getInlinerDescForProbe(
diff --git a/llvm/tools/llvm-profgen/ProfiledBinary.h b/llvm/tools/llvm-profgen/ProfiledBinary.h
index 8d96d15989593..f2eeca4545459 100644
--- a/llvm/tools/llvm-profgen/ProfiledBinary.h
+++ b/llvm/tools/llvm-profgen/ProfiledBinary.h
@@ -576,7 +576,7 @@ class ProfiledBinary {
   void getInlineContextForProbe(const MCDecodedPseudoProbe *Probe,
                                 SampleContextFrameVector &InlineContextStack,
                                 bool IncludeLeaf = false) const {
-    SmallVector<MCPseduoProbeFrameLocation, 16> ProbeInlineContext;
+    SmallVector<MCPseudoProbeFrameLocation, 16> ProbeInlineContext;
     ProbeDecoder.getInlineContextForProbe(Probe, ProbeInlineContext,
                                           IncludeLeaf);
     for (uint32_t I = 0; I < ProbeInlineContext.size(); I++) {

``````````

</details>


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


More information about the llvm-commits mailing list