| 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" |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 | 373 |
| 374 template <class TimerEvent> | 374 template <class TimerEvent> |
| 375 class TimerEventScope { | 375 class TimerEventScope { |
| 376 public: | 376 public: |
| 377 explicit TimerEventScope(Isolate* isolate) : isolate_(isolate) { | 377 explicit TimerEventScope(Isolate* isolate) : isolate_(isolate) { |
| 378 LogTimerEvent(Logger::START); | 378 LogTimerEvent(Logger::START); |
| 379 } | 379 } |
| 380 | 380 |
| 381 ~TimerEventScope() { LogTimerEvent(Logger::END); } | 381 ~TimerEventScope() { LogTimerEvent(Logger::END); } |
| 382 | 382 |
| 383 private: |
| 383 void LogTimerEvent(Logger::StartEnd se); | 384 void LogTimerEvent(Logger::StartEnd se); |
| 384 | |
| 385 private: | |
| 386 Isolate* isolate_; | 385 Isolate* isolate_; |
| 387 }; | 386 }; |
| 388 | 387 |
| 389 class CodeEventLogger : public CodeEventListener { | 388 class CodeEventLogger : public CodeEventListener { |
| 390 public: | 389 public: |
| 391 CodeEventLogger(); | 390 CodeEventLogger(); |
| 392 ~CodeEventLogger() override; | 391 ~CodeEventLogger() override; |
| 393 | 392 |
| 394 void CodeCreateEvent(LogEventsAndTags tag, AbstractCode* code, | 393 void CodeCreateEvent(LogEventsAndTags tag, AbstractCode* code, |
| 395 const char* comment) override; | 394 const char* comment) override; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 419 | 418 |
| 420 NameBuffer* name_buffer_; | 419 NameBuffer* name_buffer_; |
| 421 }; | 420 }; |
| 422 | 421 |
| 423 | 422 |
| 424 } // namespace internal | 423 } // namespace internal |
| 425 } // namespace v8 | 424 } // namespace v8 |
| 426 | 425 |
| 427 | 426 |
| 428 #endif // V8_LOG_H_ | 427 #endif // V8_LOG_H_ |
| OLD | NEW |