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_PROFILER_CPU_PROFILER_H_ | 5 #ifndef V8_PROFILER_CPU_PROFILER_H_ |
6 #define V8_PROFILER_CPU_PROFILER_H_ | 6 #define V8_PROFILER_CPU_PROFILER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 class CodeEventsContainer { | 116 class CodeEventsContainer { |
117 public: | 117 public: |
118 explicit CodeEventsContainer( | 118 explicit CodeEventsContainer( |
119 CodeEventRecord::Type type = CodeEventRecord::NONE) { | 119 CodeEventRecord::Type type = CodeEventRecord::NONE) { |
120 generic.type = type; | 120 generic.type = type; |
121 } | 121 } |
122 union { | 122 union { |
123 CodeEventRecord generic; | 123 CodeEventRecord generic; |
124 #define DECLARE_CLASS(ignore, type) type type##_; | 124 #define DECLARE_CLASS(ignore, type) type type##_; |
125 CODE_EVENTS_TYPE_LIST(DECLARE_CLASS) | 125 CODE_EVENTS_TYPE_LIST(DECLARE_CLASS) |
126 #undef DECLARE_TYPE | 126 #undef DECLARE_CLASS |
127 }; | 127 }; |
128 }; | 128 }; |
129 | 129 |
130 | 130 |
131 // This class implements both the profile events processor thread and | 131 // This class implements both the profile events processor thread and |
132 // methods called by event producers: VM and stack sampler threads. | 132 // methods called by event producers: VM and stack sampler threads. |
133 class ProfilerEventsProcessor : public base::Thread { | 133 class ProfilerEventsProcessor : public base::Thread { |
134 public: | 134 public: |
135 ProfilerEventsProcessor(Isolate* isolate, ProfileGenerator* generator, | 135 ProfilerEventsProcessor(Isolate* isolate, ProfileGenerator* generator, |
136 base::TimeDelta period); | 136 base::TimeDelta period); |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 bool is_profiling_; | 231 bool is_profiling_; |
232 | 232 |
233 DISALLOW_COPY_AND_ASSIGN(CpuProfiler); | 233 DISALLOW_COPY_AND_ASSIGN(CpuProfiler); |
234 }; | 234 }; |
235 | 235 |
236 } // namespace internal | 236 } // namespace internal |
237 } // namespace v8 | 237 } // namespace v8 |
238 | 238 |
239 | 239 |
240 #endif // V8_PROFILER_CPU_PROFILER_H_ | 240 #endif // V8_PROFILER_CPU_PROFILER_H_ |
OLD | NEW |