| OLD | NEW |
| 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 Loading... |
| 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_ |
| OLD | NEW |