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

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

Issue 2590483002: Revert of [profiler] fix memory leak for code entries for runtime callstats. (Closed)
Patch Set: Created 4 years 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();
373 372
374 void RecordTickSample(const TickSample& sample); 373 void RecordTickSample(const TickSample& sample);
375 374
376 CodeMap* code_map() { return &code_map_; } 375 CodeMap* code_map() { return &code_map_; }
377 376
378 private: 377 private:
379 CodeEntry* FindEntry(void* address); 378 CodeEntry* FindEntry(void* address);
380 CodeEntry* EntryForVMState(StateTag tag); 379 CodeEntry* EntryForVMState(StateTag tag);
381 380
382 Isolate* isolate_; 381 Isolate* isolate_;
383 CpuProfilesCollection* profiles_; 382 CpuProfilesCollection* profiles_;
384 CodeMap code_map_; 383 CodeMap code_map_;
385 std::vector<CodeEntry*> code_entries_;
386 384
387 DISALLOW_COPY_AND_ASSIGN(ProfileGenerator); 385 DISALLOW_COPY_AND_ASSIGN(ProfileGenerator);
388 }; 386 };
389 387
390 388
391 } // namespace internal 389 } // namespace internal
392 } // namespace v8 390 } // namespace v8
393 391
394 #endif // V8_PROFILER_PROFILE_GENERATOR_H_ 392 #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