| Index: src/profiler/profile-generator.cc
|
| diff --git a/src/profiler/profile-generator.cc b/src/profiler/profile-generator.cc
|
| index b3af769f4b10cc5a59ff9044300e54943bf961d9..446bbffc34fc4e566834c0bd2a4c82c7c49d79aa 100644
|
| --- a/src/profiler/profile-generator.cc
|
| +++ b/src/profiler/profile-generator.cc
|
| @@ -649,10 +649,15 @@ ProfileGenerator::ProfileGenerator(Isolate* isolate,
|
| DCHECK(counter->name());
|
| auto entry = new CodeEntry(CodeEventListener::FUNCTION_TAG, counter->name(),
|
| CodeEntry::kEmptyNamePrefix, "native V8Runtime");
|
| + code_entries_.push_back(entry);
|
| code_map_.AddCode(reinterpret_cast<Address>(counter), entry, 1);
|
| }
|
| }
|
|
|
| +ProfileGenerator::~ProfileGenerator() {
|
| + for (auto code_entry : code_entries_) delete code_entry;
|
| +}
|
| +
|
| void ProfileGenerator::RecordTickSample(const TickSample& sample) {
|
| std::vector<CodeEntry*> entries;
|
| // Conservatively reserve space for stack frames + pc + function + vm-state.
|
|
|