Skip to content

Commit 4e0ff05

Browse files
[memprof] Remove extraneous memprof:: (NFC) (#94825)
1 parent 18c67bf commit 4e0ff05

File tree

3 files changed

+15
-17
lines changed

3 files changed

+15
-17
lines changed

llvm/include/llvm/ProfileData/MemProf.h

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ struct IndexedMemProfRecord {
439439
// on the schema provided in \p Schema.
440440
void serialize(const MemProfSchema &Schema, raw_ostream &OS,
441441
IndexedVersion Version,
442-
llvm::DenseMap<memprof::CallStackId, LinearCallStackId>
442+
llvm::DenseMap<CallStackId, LinearCallStackId>
443443
*MemProfCallStackIndexes = nullptr) const;
444444

445445
// Deserializes memprof records from the Buffer.
@@ -579,15 +579,14 @@ class RecordWriterTrait {
579579
IndexedVersion Version;
580580

581581
// Mappings from CallStackId to the indexes into the call stack array.
582-
llvm::DenseMap<memprof::CallStackId, LinearCallStackId>
583-
*MemProfCallStackIndexes;
582+
llvm::DenseMap<CallStackId, LinearCallStackId> *MemProfCallStackIndexes;
584583

585584
public:
586585
// We do not support the default constructor, which does not set Version.
587586
RecordWriterTrait() = delete;
588-
RecordWriterTrait(const MemProfSchema *Schema, IndexedVersion V,
589-
llvm::DenseMap<memprof::CallStackId, LinearCallStackId>
590-
*MemProfCallStackIndexes)
587+
RecordWriterTrait(
588+
const MemProfSchema *Schema, IndexedVersion V,
589+
llvm::DenseMap<CallStackId, LinearCallStackId> *MemProfCallStackIndexes)
591590
: Schema(Schema), Version(V),
592591
MemProfCallStackIndexes(MemProfCallStackIndexes) {}
593592

@@ -1039,11 +1038,10 @@ class CallStackRadixTreeBuilder {
10391038
CallStackRadixTreeBuilder() = default;
10401039

10411040
// Build a radix tree array.
1042-
void
1043-
build(llvm::MapVector<CallStackId, llvm::SmallVector<FrameId>>
1044-
&&MemProfCallStackData,
1045-
const llvm::DenseMap<FrameId, LinearFrameId> &MemProfFrameIndexes,
1046-
llvm::DenseMap<memprof::FrameId, memprof::FrameStat> &FrameHistogram);
1041+
void build(llvm::MapVector<CallStackId, llvm::SmallVector<FrameId>>
1042+
&&MemProfCallStackData,
1043+
const llvm::DenseMap<FrameId, LinearFrameId> &MemProfFrameIndexes,
1044+
llvm::DenseMap<FrameId, FrameStat> &FrameHistogram);
10471045

10481046
const std::vector<LinearFrameId> &getRadixArray() const { return RadixArray; }
10491047

llvm/include/llvm/ProfileData/MemProfReader.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ class MemProfReader {
7676
Callback =
7777
std::bind(&MemProfReader::idToFrame, this, std::placeholders::_1);
7878

79-
memprof::CallStackIdConverter<decltype(CSIdToCallStack)> CSIdConv(
80-
CSIdToCallStack, Callback);
79+
CallStackIdConverter<decltype(CSIdToCallStack)> CSIdConv(CSIdToCallStack,
80+
Callback);
8181

8282
const IndexedMemProfRecord &IndexedRecord = Iter->second;
8383
GuidRecord = {

llvm/lib/ProfileData/MemProf.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -343,15 +343,15 @@ MemProfRecord IndexedMemProfRecord::toMemProfRecord(
343343
MemProfRecord Record;
344344

345345
Record.AllocSites.reserve(AllocSites.size());
346-
for (const memprof::IndexedAllocationInfo &IndexedAI : AllocSites) {
347-
memprof::AllocationInfo AI;
346+
for (const IndexedAllocationInfo &IndexedAI : AllocSites) {
347+
AllocationInfo AI;
348348
AI.Info = IndexedAI.Info;
349349
AI.CallStack = Callback(IndexedAI.CSId);
350350
Record.AllocSites.push_back(std::move(AI));
351351
}
352352

353353
Record.CallSites.reserve(CallSiteIds.size());
354-
for (memprof::CallStackId CSId : CallSiteIds)
354+
for (CallStackId CSId : CallSiteIds)
355355
Record.CallSites.push_back(Callback(CSId));
356356

357357
return Record;
@@ -487,7 +487,7 @@ void CallStackRadixTreeBuilder::build(
487487
llvm::MapVector<CallStackId, llvm::SmallVector<FrameId>>
488488
&&MemProfCallStackData,
489489
const llvm::DenseMap<FrameId, LinearFrameId> &MemProfFrameIndexes,
490-
llvm::DenseMap<memprof::FrameId, memprof::FrameStat> &FrameHistogram) {
490+
llvm::DenseMap<FrameId, FrameStat> &FrameHistogram) {
491491
// Take the vector portion of MemProfCallStackData. The vector is exactly
492492
// what we need to sort. Also, we no longer need its lookup capability.
493493
llvm::SmallVector<CSIdPair, 0> CallStacks = MemProfCallStackData.takeVector();

0 commit comments

Comments
 (0)