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

Side by Side Diff: src/profiler/profile-generator.h

Issue 2586923002: [profiler] fix memory leak for code entries for runtime callstats. (Closed)
Patch Set: Created 3 years, 12 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/profile-generator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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_PROFILE_GENERATOR_H_ 5 #ifndef V8_PROFILER_PROFILE_GENERATOR_H_
6 #define V8_PROFILER_PROFILE_GENERATOR_H_ 6 #define V8_PROFILER_PROFILE_GENERATOR_H_
7 7
8 #include <map> 8 #include <map>
9 #include "src/allocation.h" 9 #include "src/allocation.h"
10 #include "src/base/hashmap.h" 10 #include "src/base/hashmap.h"
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 List<CpuProfile*> current_profiles_; 362 List<CpuProfile*> current_profiles_;
363 base::Semaphore current_profiles_semaphore_; 363 base::Semaphore current_profiles_semaphore_;
364 364
365 DISALLOW_COPY_AND_ASSIGN(CpuProfilesCollection); 365 DISALLOW_COPY_AND_ASSIGN(CpuProfilesCollection);
366 }; 366 };
367 367
368 368
369 class ProfileGenerator { 369 class ProfileGenerator {
370 public: 370 public:
371 ProfileGenerator(Isolate* isolate, CpuProfilesCollection* profiles); 371 ProfileGenerator(Isolate* isolate, CpuProfilesCollection* profiles);
372 ~ProfileGenerator();
372 373
373 void RecordTickSample(const TickSample& sample); 374 void RecordTickSample(const TickSample& sample);
374 375
375 CodeMap* code_map() { return &code_map_; } 376 CodeMap* code_map() { return &code_map_; }
376 377
377 private: 378 private:
378 CodeEntry* FindEntry(void* address); 379 CodeEntry* FindEntry(void* address);
379 CodeEntry* EntryForVMState(StateTag tag); 380 CodeEntry* EntryForVMState(StateTag tag);
380 381
381 Isolate* isolate_; 382 Isolate* isolate_;
382 CpuProfilesCollection* profiles_; 383 CpuProfilesCollection* profiles_;
383 CodeMap code_map_; 384 CodeMap code_map_;
385 std::vector<CodeEntry*> code_entries_;
384 386
385 DISALLOW_COPY_AND_ASSIGN(ProfileGenerator); 387 DISALLOW_COPY_AND_ASSIGN(ProfileGenerator);
386 }; 388 };
387 389
388 390
389 } // namespace internal 391 } // namespace internal
390 } // namespace v8 392 } // namespace v8
391 393
392 #endif // V8_PROFILER_PROFILE_GENERATOR_H_ 394 #endif // V8_PROFILER_PROFILE_GENERATOR_H_
OLDNEW
« no previous file with comments | « no previous file | src/profiler/profile-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698