Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(896)

Unified Diff: src/profiler/profile-generator.cc

Issue 2655963003: [profiler] Fix a memory leak of CodeEvent objects (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/profiler/profile-generator.cc
diff --git a/src/profiler/profile-generator.cc b/src/profiler/profile-generator.cc
index 72e02b360b2cc1f1bb7f1300ad82bfc824f1093c..a25e5cf8995802b55a8785cb29dbecf00ad75fcb 100644
--- a/src/profiler/profile-generator.cc
+++ b/src/profiler/profile-generator.cc
@@ -635,18 +635,8 @@ void CpuProfilesCollection::AddPathToCurrentProfiles(
current_profiles_semaphore_.Signal();
}
-ProfileGenerator::ProfileGenerator(Isolate* isolate,
- CpuProfilesCollection* profiles)
- : isolate_(isolate), profiles_(profiles) {
- RuntimeCallStats* rcs = isolate_->counters()->runtime_call_stats();
- for (int i = 0; i < RuntimeCallStats::counters_count; ++i) {
- RuntimeCallCounter* counter = &(rcs->*(RuntimeCallStats::counters[i]));
- DCHECK(counter->name());
- auto entry = new CodeEntry(CodeEventListener::FUNCTION_TAG, counter->name(),
- CodeEntry::kEmptyNamePrefix, "native V8Runtime");
- code_map_.AddCode(reinterpret_cast<Address>(counter), entry, 1);
- }
-}
+ProfileGenerator::ProfileGenerator(CpuProfilesCollection* profiles)
+ : profiles_(profiles) {}
void ProfileGenerator::RecordTickSample(const TickSample& sample) {
std::vector<CodeEntry*> entries;

Powered by Google App Engine
This is Rietveld 408576698