| OLD | NEW |
| 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_CPU_PROFILER_H_ | 5 #ifndef V8_CPU_PROFILER_H_ |
| 6 #define V8_CPU_PROFILER_H_ | 6 #define V8_CPU_PROFILER_H_ |
| 7 | 7 |
| 8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/base/atomicops.h" | 9 #include "src/base/atomicops.h" |
| 10 #include "src/base/platform/time.h" | 10 #include "src/base/platform/time.h" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 | 106 |
| 107 | 107 |
| 108 class CodeEventsContainer { | 108 class CodeEventsContainer { |
| 109 public: | 109 public: |
| 110 explicit CodeEventsContainer( | 110 explicit CodeEventsContainer( |
| 111 CodeEventRecord::Type type = CodeEventRecord::NONE) { | 111 CodeEventRecord::Type type = CodeEventRecord::NONE) { |
| 112 generic.type = type; | 112 generic.type = type; |
| 113 } | 113 } |
| 114 union { | 114 union { |
| 115 CodeEventRecord generic; | 115 CodeEventRecord generic; |
| 116 #define DECLARE_CLASS(ignore, type) type type##_; | 116 #define DECLARE_TYPE(ignore, type) type type##_; |
| 117 CODE_EVENTS_TYPE_LIST(DECLARE_CLASS) | 117 CODE_EVENTS_TYPE_LIST(DECLARE_TYPE) |
| 118 #undef DECLARE_TYPE | 118 #undef DECLARE_TYPE |
| 119 }; | 119 }; |
| 120 }; | 120 }; |
| 121 | 121 |
| 122 | 122 |
| 123 // This class implements both the profile events processor thread and | 123 // This class implements both the profile events processor thread and |
| 124 // methods called by event producers: VM and stack sampler threads. | 124 // methods called by event producers: VM and stack sampler threads. |
| 125 class ProfilerEventsProcessor : public base::Thread { | 125 class ProfilerEventsProcessor : public base::Thread { |
| 126 public: | 126 public: |
| 127 ProfilerEventsProcessor(ProfileGenerator* generator, | 127 ProfilerEventsProcessor(ProfileGenerator* generator, |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 bool saved_is_logging_; | 266 bool saved_is_logging_; |
| 267 bool is_profiling_; | 267 bool is_profiling_; |
| 268 | 268 |
| 269 DISALLOW_COPY_AND_ASSIGN(CpuProfiler); | 269 DISALLOW_COPY_AND_ASSIGN(CpuProfiler); |
| 270 }; | 270 }; |
| 271 | 271 |
| 272 } } // namespace v8::internal | 272 } } // namespace v8::internal |
| 273 | 273 |
| 274 | 274 |
| 275 #endif // V8_CPU_PROFILER_H_ | 275 #endif // V8_CPU_PROFILER_H_ |
| OLD | NEW |