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_LOG_H_ | 5 #ifndef V8_LOG_H_ |
6 #define V8_LOG_H_ | 6 #define V8_LOG_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
11 #include "src/base/compiler-specific.h" | 11 #include "src/base/compiler-specific.h" |
12 #include "src/base/platform/elapsed-timer.h" | 12 #include "src/base/platform/elapsed-timer.h" |
13 #include "src/base/platform/platform.h" | 13 #include "src/base/platform/platform.h" |
14 #include "src/code-events.h" | 14 #include "src/code-events.h" |
15 #include "src/isolate.h" | 15 #include "src/isolate.h" |
16 #include "src/objects.h" | 16 #include "src/objects.h" |
17 | 17 |
18 namespace v8 { | 18 namespace v8 { |
19 | 19 |
20 namespace base { | 20 namespace base { |
21 class Semaphore; | 21 class Semaphore; |
22 } | 22 } |
23 | 23 |
24 namespace sampler { | 24 namespace sampler { |
25 class Sampler; | 25 class Sampler; |
26 } | 26 } |
27 | 27 |
| 28 struct TickSample; |
| 29 |
28 namespace internal { | 30 namespace internal { |
29 | 31 |
30 // Logger is used for collecting logging information from V8 during | 32 // Logger is used for collecting logging information from V8 during |
31 // execution. The result is dumped to a file. | 33 // execution. The result is dumped to a file. |
32 // | 34 // |
33 // Available command line flags: | 35 // Available command line flags: |
34 // | 36 // |
35 // --log | 37 // --log |
36 // Minimal logging (no API, code, or GC sample events), default is off. | 38 // Minimal logging (no API, code, or GC sample events), default is off. |
37 // | 39 // |
(...skipping 24 matching lines...) Expand all Loading... |
62 // tick profiler requires code events, so --prof implies --log-code. | 64 // tick profiler requires code events, so --prof implies --log-code. |
63 | 65 |
64 // Forward declarations. | 66 // Forward declarations. |
65 class CodeEventListener; | 67 class CodeEventListener; |
66 class CpuProfiler; | 68 class CpuProfiler; |
67 class Isolate; | 69 class Isolate; |
68 class Log; | 70 class Log; |
69 class PositionsRecorder; | 71 class PositionsRecorder; |
70 class Profiler; | 72 class Profiler; |
71 class Ticker; | 73 class Ticker; |
72 struct TickSample; | |
73 class RuntimeCallTimer; | 74 class RuntimeCallTimer; |
74 | 75 |
75 #undef LOG | 76 #undef LOG |
76 #define LOG(isolate, Call) \ | 77 #define LOG(isolate, Call) \ |
77 do { \ | 78 do { \ |
78 v8::internal::Logger* logger = (isolate)->logger(); \ | 79 v8::internal::Logger* logger = (isolate)->logger(); \ |
79 if (logger->is_logging()) logger->Call; \ | 80 if (logger->is_logging()) logger->Call; \ |
80 } while (false) | 81 } while (false) |
81 | 82 |
82 #define LOG_CODE_EVENT(isolate, Call) \ | 83 #define LOG_CODE_EVENT(isolate, Call) \ |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 | 445 |
445 NameBuffer* name_buffer_; | 446 NameBuffer* name_buffer_; |
446 }; | 447 }; |
447 | 448 |
448 | 449 |
449 } // namespace internal | 450 } // namespace internal |
450 } // namespace v8 | 451 } // namespace v8 |
451 | 452 |
452 | 453 |
453 #endif // V8_LOG_H_ | 454 #endif // V8_LOG_H_ |
OLD | NEW |