diff options
Diffstat (limited to 'src/3rdparty/v8/src/log.h')
-rw-r--r-- | src/3rdparty/v8/src/log.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/3rdparty/v8/src/log.h b/src/3rdparty/v8/src/log.h index 03c7b3b..33f359a 100644 --- a/src/3rdparty/v8/src/log.h +++ b/src/3rdparty/v8/src/log.h @@ -86,6 +86,15 @@ class Ticker; logger->Call; \ } while (false) +#define LOG_CODE_EVENT(isolate, Call) \ + do { \ + v8::internal::Logger* logger = \ + (isolate)->logger(); \ + if (logger->is_logging_code_events()) \ + logger->Call; \ + } while (false) + + #define LOG_EVENTS_AND_TAGS_LIST(V) \ V(CODE_CREATION_EVENT, "code-creation") \ V(CODE_MOVE_EVENT, "code-move") \ @@ -151,6 +160,10 @@ class Logger { // Acquires resources for logging if the right flags are set. bool SetUp(); + // Sets the current code event handler. + void SetCodeEventHandler(uint32_t options, + JitCodeEventHandler event_handler); + void EnsureTickerStarted(); void EnsureTickerStopped(); @@ -274,6 +287,10 @@ class Logger { return logging_nesting_ > 0; } + bool is_logging_code_events() { + return is_logging() || code_event_handler_ != NULL; + } + // Pause/Resume collection of profiling data. // When data collection is paused, CPU Tick events are discarded until // data collection is Resumed. @@ -312,6 +329,11 @@ class Logger { Logger(); ~Logger(); + // Issue code notifications. + void IssueCodeAddedEvent(Code* code, const char* name, size_t name_len); + void IssueCodeMovedEvent(Address from, Address to); + void IssueCodeRemovedEvent(Address from); + // Emits the profiler's first message. void ProfilerBeginEvent(); @@ -413,6 +435,9 @@ class Logger { // 'true' between SetUp() and TearDown(). bool is_initialized_; + // The code event handler - if any. + JitCodeEventHandler code_event_handler_; + // Support for 'incremental addresses' in compressed logs: // LogMessageBuilder::AppendAddress(Address addr) Address last_address_; |