Skip to content

Commit

Permalink
[MC][NFC] Fix typo in MCPseudoProbeFrameLocation
Browse files Browse the repository at this point in the history
  • Loading branch information
aaupov committed Jul 8, 2024
1 parent d3cb277 commit 5313885
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions llvm/include/llvm/MC/MCPseudoProbe.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down Expand Up @@ -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 {
Expand Down
10 changes: 5 additions & 5 deletions llvm/lib/MC/MCPseudoProbe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand All @@ -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())
Expand Down Expand Up @@ -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)
Expand All @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion llvm/tools/llvm-profgen/ProfiledBinary.h
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down

0 comments on commit 5313885

Please sign in to comment.