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

Side by Side Diff: src/profiler/cpu-profiler.h

Issue 2655963003: [profiler] Fix a memory leak of CodeEvent objects (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/profiler/cpu-profiler.cc » ('j') | src/profiler/cpu-profiler.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_PROFILER_CPU_PROFILER_H_ 5 #ifndef V8_PROFILER_CPU_PROFILER_H_
6 #define V8_PROFILER_CPU_PROFILER_H_ 6 #define V8_PROFILER_CPU_PROFILER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 ProfileGenerator* generator() const { return generator_.get(); } 213 ProfileGenerator* generator() const { return generator_.get(); }
214 ProfilerEventsProcessor* processor() const { return processor_.get(); } 214 ProfilerEventsProcessor* processor() const { return processor_.get(); }
215 Isolate* isolate() const { return isolate_; } 215 Isolate* isolate() const { return isolate_; }
216 216
217 private: 217 private:
218 void StartProcessorIfNotStarted(); 218 void StartProcessorIfNotStarted();
219 void StopProcessorIfLastProfile(const char* title); 219 void StopProcessorIfLastProfile(const char* title);
220 void StopProcessor(); 220 void StopProcessor();
221 void ResetProfiles(); 221 void ResetProfiles();
222 void LogBuiltins(); 222 void LogBuiltins();
223 void CreateEntriesForRuntimeCallStats();
223 224
224 Isolate* const isolate_; 225 Isolate* const isolate_;
225 base::TimeDelta sampling_interval_; 226 base::TimeDelta sampling_interval_;
226 std::unique_ptr<CpuProfilesCollection> profiles_; 227 std::unique_ptr<CpuProfilesCollection> profiles_;
227 std::unique_ptr<ProfileGenerator> generator_; 228 std::unique_ptr<ProfileGenerator> generator_;
228 std::unique_ptr<ProfilerEventsProcessor> processor_; 229 std::unique_ptr<ProfilerEventsProcessor> processor_;
230 std::vector<std::unique_ptr<CodeEntry>> static_entries_;
229 bool saved_is_logging_; 231 bool saved_is_logging_;
230 bool is_profiling_; 232 bool is_profiling_;
231 233
232 DISALLOW_COPY_AND_ASSIGN(CpuProfiler); 234 DISALLOW_COPY_AND_ASSIGN(CpuProfiler);
233 }; 235 };
234 236
235 } // namespace internal 237 } // namespace internal
236 } // namespace v8 238 } // namespace v8
237 239
238 240
239 #endif // V8_PROFILER_CPU_PROFILER_H_ 241 #endif // V8_PROFILER_CPU_PROFILER_H_
OLDNEW
« no previous file with comments | « no previous file | src/profiler/cpu-profiler.cc » ('j') | src/profiler/cpu-profiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698