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 "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/base/atomic-utils.h" | 9 #include "src/base/atomic-utils.h" |
10 #include "src/base/atomicops.h" | 10 #include "src/base/atomicops.h" |
11 #include "src/base/platform/time.h" | 11 #include "src/base/platform/time.h" |
12 #include "src/compiler.h" | 12 #include "src/compiler.h" |
13 #include "src/locked-queue.h" | 13 #include "src/locked-queue.h" |
14 #include "src/profiler/circular-queue.h" | 14 #include "src/profiler/circular-queue.h" |
15 #include "src/profiler/sampler.h" | 15 #include "src/profiler/sampler.h" |
16 | 16 |
17 namespace v8 { | 17 namespace v8 { |
18 namespace internal { | 18 namespace internal { |
19 | 19 |
20 // Forward declarations. | 20 // Forward declarations. |
21 class CodeEntry; | 21 class CodeEntry; |
22 class CodeMap; | 22 class CodeMap; |
23 class CompilationInfo; | |
24 class CpuProfile; | 23 class CpuProfile; |
25 class CpuProfilesCollection; | 24 class CpuProfilesCollection; |
26 class ProfileGenerator; | 25 class ProfileGenerator; |
27 | 26 |
28 #define CODE_EVENTS_TYPE_LIST(V) \ | 27 #define CODE_EVENTS_TYPE_LIST(V) \ |
29 V(CODE_CREATION, CodeCreateEventRecord) \ | 28 V(CODE_CREATION, CodeCreateEventRecord) \ |
30 V(CODE_MOVE, CodeMoveEventRecord) \ | 29 V(CODE_MOVE, CodeMoveEventRecord) \ |
31 V(CODE_DISABLE_OPT, CodeDisableOptEventRecord) \ | 30 V(CODE_DISABLE_OPT, CodeDisableOptEventRecord) \ |
32 V(CODE_DEOPT, CodeDeoptEventRecord) \ | 31 V(CODE_DEOPT, CodeDeoptEventRecord) \ |
33 V(REPORT_BUILTIN, ReportBuiltinEventRecord) | 32 V(REPORT_BUILTIN, ReportBuiltinEventRecord) |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 // Must be called via PROFILE macro, otherwise will crash when | 220 // Must be called via PROFILE macro, otherwise will crash when |
222 // profiling is not enabled. | 221 // profiling is not enabled. |
223 void CallbackEvent(Name* name, Address entry_point) override; | 222 void CallbackEvent(Name* name, Address entry_point) override; |
224 void CodeCreateEvent(Logger::LogEventsAndTags tag, AbstractCode* code, | 223 void CodeCreateEvent(Logger::LogEventsAndTags tag, AbstractCode* code, |
225 const char* comment) override; | 224 const char* comment) override; |
226 void CodeCreateEvent(Logger::LogEventsAndTags tag, AbstractCode* code, | 225 void CodeCreateEvent(Logger::LogEventsAndTags tag, AbstractCode* code, |
227 Name* name) override; | 226 Name* name) override; |
228 void CodeCreateEvent(Logger::LogEventsAndTags tag, AbstractCode* code, | 227 void CodeCreateEvent(Logger::LogEventsAndTags tag, AbstractCode* code, |
229 SharedFunctionInfo* shared, Name* script_name) override; | 228 SharedFunctionInfo* shared, Name* script_name) override; |
230 void CodeCreateEvent(Logger::LogEventsAndTags tag, AbstractCode* code, | 229 void CodeCreateEvent(Logger::LogEventsAndTags tag, AbstractCode* code, |
231 SharedFunctionInfo* shared, CompilationInfo* info, | 230 SharedFunctionInfo* shared, Name* script_name, int line, |
232 Name* script_name, int line, int column) override; | 231 int column) override; |
233 void CodeCreateEvent(Logger::LogEventsAndTags tag, AbstractCode* code, | 232 void CodeCreateEvent(Logger::LogEventsAndTags tag, AbstractCode* code, |
234 int args_count) override; | 233 int args_count) override; |
235 void CodeMovingGCEvent() override {} | 234 void CodeMovingGCEvent() override {} |
236 void CodeMoveEvent(AbstractCode* from, Address to) override; | 235 void CodeMoveEvent(AbstractCode* from, Address to) override; |
237 void CodeDisableOptEvent(AbstractCode* code, | 236 void CodeDisableOptEvent(AbstractCode* code, |
238 SharedFunctionInfo* shared) override; | 237 SharedFunctionInfo* shared) override; |
239 void CodeDeoptEvent(Code* code, Address pc, int fp_to_sp_delta); | 238 void CodeDeoptEvent(Code* code, Address pc, int fp_to_sp_delta); |
240 void GetterCallbackEvent(Name* name, Address entry_point) override; | 239 void GetterCallbackEvent(Name* name, Address entry_point) override; |
241 void RegExpCodeCreateEvent(AbstractCode* code, String* source) override; | 240 void RegExpCodeCreateEvent(AbstractCode* code, String* source) override; |
242 void SetterCallbackEvent(Name* name, Address entry_point) override; | 241 void SetterCallbackEvent(Name* name, Address entry_point) override; |
(...skipping 27 matching lines...) Expand all Loading... |
270 bool is_profiling_; | 269 bool is_profiling_; |
271 | 270 |
272 DISALLOW_COPY_AND_ASSIGN(CpuProfiler); | 271 DISALLOW_COPY_AND_ASSIGN(CpuProfiler); |
273 }; | 272 }; |
274 | 273 |
275 } // namespace internal | 274 } // namespace internal |
276 } // namespace v8 | 275 } // namespace v8 |
277 | 276 |
278 | 277 |
279 #endif // V8_PROFILER_CPU_PROFILER_H_ | 278 #endif // V8_PROFILER_CPU_PROFILER_H_ |
OLD | NEW |