@@ -147,14 +147,14 @@ class RawMemProfReader final : public MemProfReader {
147
147
llvm::SmallVectorImpl<SegmentEntry> &Seg,
148
148
llvm::MapVector<uint64_t , MemInfoBlock> &Prof,
149
149
CallStackMap &SM, bool KeepName = false )
150
- : Symbolizer(std::move(Sym)), SegmentInfo(Seg.begin(), Seg.end()),
151
- CallstackProfileData(Prof), StackMap(SM), KeepSymbolName(KeepName) {
150
+ : SegmentInfo(Seg.begin(), Seg.end()), CallstackProfileData(Prof ),
151
+ StackMap(SM), KeepSymbolName(KeepName) {
152
152
// We don't call initialize here since there is no raw profile to read. The
153
153
// test should pass in the raw profile as structured data.
154
154
155
155
// If there is an error here then the mock symbolizer has not been
156
156
// initialized properly.
157
- if (Error E = symbolizeAndFilterStackFrames ())
157
+ if (Error E = symbolizeAndFilterStackFrames (std::move (Sym) ))
158
158
report_fatal_error (std::move (E));
159
159
if (Error E = mapRawProfileToRecords ())
160
160
report_fatal_error (std::move (E));
@@ -173,7 +173,8 @@ class RawMemProfReader final : public MemProfReader {
173
173
// callstacks from the raw profile. Also prune callstack frames which we can't
174
174
// symbolize or those that belong to the runtime. For profile entries where
175
175
// the entire callstack is pruned, we drop the entry from the profile.
176
- Error symbolizeAndFilterStackFrames ();
176
+ Error symbolizeAndFilterStackFrames (
177
+ std::unique_ptr<llvm::symbolize::SymbolizableModule> Symbolizer);
177
178
// Construct memprof records for each function and store it in the
178
179
// `FunctionProfileData` map. A function may have allocation profile data or
179
180
// callsite data or both.
@@ -183,8 +184,6 @@ class RawMemProfReader final : public MemProfReader {
183
184
184
185
// The profiled binary.
185
186
object::OwningBinary<object::Binary> Binary;
186
- // A symbolizer to translate virtual addresses to code locations.
187
- std::unique_ptr<llvm::symbolize::SymbolizableModule> Symbolizer;
188
187
// The preferred load address of the executable segment.
189
188
uint64_t PreferredTextSegmentAddress = 0 ;
190
189
// The base address of the text segment in the process during profiling.
0 commit comments