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 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 } | 434 } |
435 | 435 |
436 ~TimerEventScope() { LogTimerEvent(Logger::END); } | 436 ~TimerEventScope() { LogTimerEvent(Logger::END); } |
437 | 437 |
438 void LogTimerEvent(Logger::StartEnd se); | 438 void LogTimerEvent(Logger::StartEnd se); |
439 | 439 |
440 private: | 440 private: |
441 Isolate* isolate_; | 441 Isolate* isolate_; |
442 }; | 442 }; |
443 | 443 |
| 444 class PositionsRecorder BASE_EMBEDDED { |
| 445 public: |
| 446 PositionsRecorder() { jit_handler_data_ = NULL; } |
| 447 |
| 448 void AttachJITHandlerData(void* user_data) { jit_handler_data_ = user_data; } |
| 449 |
| 450 void* DetachJITHandlerData() { |
| 451 void* old_data = jit_handler_data_; |
| 452 jit_handler_data_ = NULL; |
| 453 return old_data; |
| 454 } |
| 455 |
| 456 protected: |
| 457 // Currently jit_handler_data_ is used to store JITHandler-specific data |
| 458 // over the lifetime of a PositionsRecorder |
| 459 void* jit_handler_data_; |
| 460 |
| 461 private: |
| 462 DISALLOW_COPY_AND_ASSIGN(PositionsRecorder); |
| 463 }; |
444 | 464 |
445 class CodeEventListener { | 465 class CodeEventListener { |
446 public: | 466 public: |
447 virtual ~CodeEventListener() {} | 467 virtual ~CodeEventListener() {} |
448 | 468 |
449 virtual void CodeCreateEvent(Logger::LogEventsAndTags tag, AbstractCode* code, | 469 virtual void CodeCreateEvent(Logger::LogEventsAndTags tag, AbstractCode* code, |
450 const char* comment) = 0; | 470 const char* comment) = 0; |
451 virtual void CodeCreateEvent(Logger::LogEventsAndTags tag, AbstractCode* code, | 471 virtual void CodeCreateEvent(Logger::LogEventsAndTags tag, AbstractCode* code, |
452 Name* name) = 0; | 472 Name* name) = 0; |
453 virtual void CodeCreateEvent(Logger::LogEventsAndTags tag, AbstractCode* code, | 473 virtual void CodeCreateEvent(Logger::LogEventsAndTags tag, AbstractCode* code, |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 | 524 |
505 NameBuffer* name_buffer_; | 525 NameBuffer* name_buffer_; |
506 }; | 526 }; |
507 | 527 |
508 | 528 |
509 } // namespace internal | 529 } // namespace internal |
510 } // namespace v8 | 530 } // namespace v8 |
511 | 531 |
512 | 532 |
513 #endif // V8_LOG_H_ | 533 #endif // V8_LOG_H_ |
OLD | NEW |