OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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_COMPILER_DISPATCHER_COMPILER_DISPATCHER_TRACER_H_ | 5 #ifndef V8_COMPILER_DISPATCHER_COMPILER_DISPATCHER_TRACER_H_ |
6 #define V8_COMPILER_DISPATCHER_COMPILER_DISPATCHER_TRACER_H_ | 6 #define V8_COMPILER_DISPATCHER_COMPILER_DISPATCHER_TRACER_H_ |
7 | 7 |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "src/base/macros.h" | 10 #include "src/base/macros.h" |
11 #include "src/base/platform/mutex.h" | 11 #include "src/base/platform/mutex.h" |
12 #include "src/base/ring-buffer.h" | 12 #include "src/base/ring-buffer.h" |
13 #include "src/counters.h" | 13 #include "src/counters.h" |
| 14 #include "src/globals.h" |
14 | 15 |
15 namespace v8 { | 16 namespace v8 { |
16 namespace internal { | 17 namespace internal { |
17 | 18 |
18 class Isolate; | 19 class Isolate; |
19 class RuntimeCallStats; | 20 class RuntimeCallStats; |
20 | 21 |
21 #define COMPILER_DISPATCHER_TRACE_SCOPE_WITH_NUM(tracer, scope_id, num) \ | 22 #define COMPILER_DISPATCHER_TRACE_SCOPE_WITH_NUM(tracer, scope_id, num) \ |
22 CompilerDispatcherTracer::ScopeID tracer_scope_id( \ | 23 CompilerDispatcherTracer::ScopeID tracer_scope_id( \ |
23 CompilerDispatcherTracer::ScopeID::scope_id); \ | 24 CompilerDispatcherTracer::ScopeID::scope_id); \ |
24 CompilerDispatcherTracer::Scope trace_scope(tracer, tracer_scope_id, num); \ | 25 CompilerDispatcherTracer::Scope trace_scope(tracer, tracer_scope_id, num); \ |
25 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), \ | 26 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), \ |
26 CompilerDispatcherTracer::Scope::Name(tracer_scope_id)) | 27 CompilerDispatcherTracer::Scope::Name(tracer_scope_id)) |
27 | 28 |
28 #define COMPILER_DISPATCHER_TRACE_SCOPE(tracer, scope_id) \ | 29 #define COMPILER_DISPATCHER_TRACE_SCOPE(tracer, scope_id) \ |
29 COMPILER_DISPATCHER_TRACE_SCOPE_WITH_NUM(tracer, scope_id, 0) | 30 COMPILER_DISPATCHER_TRACE_SCOPE_WITH_NUM(tracer, scope_id, 0) |
30 | 31 |
31 class CompilerDispatcherTracer { | 32 class V8_EXPORT_PRIVATE CompilerDispatcherTracer { |
32 public: | 33 public: |
33 enum class ScopeID { | 34 enum class ScopeID { |
34 kPrepareToParse, | 35 kPrepareToParse, |
35 kParse, | 36 kParse, |
36 kFinalizeParsing, | 37 kFinalizeParsing, |
37 kPrepareToCompile, | 38 kPrepareToCompile, |
38 kCompile, | 39 kCompile, |
39 kFinalizeCompiling | 40 kFinalizeCompiling |
40 }; | 41 }; |
41 | 42 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 | 89 |
89 RuntimeCallStats* runtime_call_stats_; | 90 RuntimeCallStats* runtime_call_stats_; |
90 | 91 |
91 DISALLOW_COPY_AND_ASSIGN(CompilerDispatcherTracer); | 92 DISALLOW_COPY_AND_ASSIGN(CompilerDispatcherTracer); |
92 }; | 93 }; |
93 | 94 |
94 } // namespace internal | 95 } // namespace internal |
95 } // namespace v8 | 96 } // namespace v8 |
96 | 97 |
97 #endif // V8_COMPILER_DISPATCHER_COMPILER_DISPATCHER_TRACER_H_ | 98 #endif // V8_COMPILER_DISPATCHER_COMPILER_DISPATCHER_TRACER_H_ |
OLD | NEW |