diff options
author | isaacs <i@izs.me> | 2012-09-18 15:20:38 -0700 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2012-09-21 01:52:24 +0200 |
commit | 3411a03dd114d635800cc50749d2351cd734eb2a (patch) | |
tree | 0ba1e52ab2236286894b33400302181ece91b63a /deps/v8/src/log.h | |
parent | cc1b09d6b7c3cc6b8729804cbf644634ba5d0815 (diff) | |
download | android-node-v8-3411a03dd114d635800cc50749d2351cd734eb2a.tar.gz android-node-v8-3411a03dd114d635800cc50749d2351cd734eb2a.tar.bz2 android-node-v8-3411a03dd114d635800cc50749d2351cd734eb2a.zip |
V8: Upgrade to 3.13.7.1
Diffstat (limited to 'deps/v8/src/log.h')
-rw-r--r-- | deps/v8/src/log.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/deps/v8/src/log.h b/deps/v8/src/log.h index 03c7b3b670..33f359a7f9 100644 --- a/deps/v8/src/log.h +++ b/deps/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_; |