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/platform/elapsed-timer.h" | 12 #include "src/base/platform/elapsed-timer.h" |
12 #include "src/base/platform/platform.h" | 13 #include "src/base/platform/platform.h" |
13 #include "src/objects.h" | 14 #include "src/objects.h" |
14 | 15 |
15 namespace v8 { | 16 namespace v8 { |
16 | 17 |
17 namespace base { | 18 namespace base { |
18 class Semaphore; | 19 class Semaphore; |
19 } | 20 } |
20 | 21 |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 | 348 |
348 // Used for logging stubs found in the snapshot. | 349 // Used for logging stubs found in the snapshot. |
349 void LogCodeObject(Object* code_object); | 350 void LogCodeObject(Object* code_object); |
350 | 351 |
351 // Helper method. It resets name_buffer_ and add tag name into it. | 352 // Helper method. It resets name_buffer_ and add tag name into it. |
352 void InitNameBuffer(LogEventsAndTags tag); | 353 void InitNameBuffer(LogEventsAndTags tag); |
353 | 354 |
354 // Emits a profiler tick event. Used by the profiler thread. | 355 // Emits a profiler tick event. Used by the profiler thread. |
355 void TickEvent(TickSample* sample, bool overflow); | 356 void TickEvent(TickSample* sample, bool overflow); |
356 | 357 |
357 void ApiEvent(const char* name, ...); | 358 PRINTF_FORMAT(2, 3) void ApiEvent(const char* format, ...); |
358 | 359 |
359 // Logs a StringEvent regardless of whether FLAG_log is true. | 360 // Logs a StringEvent regardless of whether FLAG_log is true. |
360 void UncheckedStringEvent(const char* name, const char* value); | 361 void UncheckedStringEvent(const char* name, const char* value); |
361 | 362 |
362 // Logs an IntEvent regardless of whether FLAG_log is true. | 363 // Logs an IntEvent regardless of whether FLAG_log is true. |
363 void UncheckedIntEvent(const char* name, int value); | 364 void UncheckedIntEvent(const char* name, int value); |
364 void UncheckedIntPtrTEvent(const char* name, intptr_t value); | 365 void UncheckedIntPtrTEvent(const char* name, intptr_t value); |
365 | 366 |
366 Isolate* isolate_; | 367 Isolate* isolate_; |
367 | 368 |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 | 523 |
523 NameBuffer* name_buffer_; | 524 NameBuffer* name_buffer_; |
524 }; | 525 }; |
525 | 526 |
526 | 527 |
527 } // namespace internal | 528 } // namespace internal |
528 } // namespace v8 | 529 } // namespace v8 |
529 | 530 |
530 | 531 |
531 #endif // V8_LOG_H_ | 532 #endif // V8_LOG_H_ |
OLD | NEW |