OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef V8_SAMPLER_THREAD_H_ |
| 6 #define V8_SAMPLER_THREAD_H_ |
| 7 |
| 8 #include "include/v8-sampler.h" |
| 9 #include "src/v8.h" |
| 10 |
| 11 #include "src/base/platform/platform.h" |
| 12 |
| 13 namespace v8 { |
| 14 |
| 15 class CodeEventPrinter: public CodeEventHandler{ |
| 16 public: |
| 17 void Create(const void* from, |
| 18 const int size, |
| 19 const std::string& name); |
| 20 void Delete(const void* from); |
| 21 void Move(const void* from, const void* to); |
| 22 void SharedLibrary(const std::string& library_path, |
| 23 const void* start, |
| 24 const void* end); |
| 25 }; |
| 26 |
| 27 class SamplerThread : public base::Thread { |
| 28 public: |
| 29 explicit SamplerThread(Isolate* isolate); |
| 30 virtual ~SamplerThread() {} |
| 31 |
| 32 void Stop(); |
| 33 |
| 34 // Thread control. |
| 35 virtual void Run(); |
| 36 |
| 37 private: |
| 38 Isolate* isolate_; |
| 39 bool done_sampling_; |
| 40 }; |
| 41 |
| 42 } // namespace v8 |
| 43 |
| 44 #endif // V8_SAMPLER_THREAD_H_ |
OLD | NEW |