| Index: src/log.h | 
| diff --git a/src/log.h b/src/log.h | 
| index 03c7b3b6705fd3460d5b12f532e3508a3e0ee17b..8c4a8d86cfbd5cf91576257d2f45592114f5f5b8 100644 | 
| --- a/src/log.h | 
| +++ b/src/log.h | 
| @@ -77,6 +77,7 @@ class Semaphore; | 
| class SlidingStateWindow; | 
| class Ticker; | 
|  | 
| + | 
| #undef LOG | 
| #define LOG(isolate, Call)                          \ | 
| do {                                              \ | 
| @@ -271,7 +272,7 @@ class Logger { | 
| void LogRuntime(Vector<const char> format, JSArray* args); | 
|  | 
| bool is_logging() { | 
| -    return logging_nesting_ > 0; | 
| +    return logging_nesting_ > 0 || CodeAddressCallbackEnabled(); | 
| } | 
|  | 
| // Pause/Resume collection of profiling data. | 
| @@ -371,6 +372,9 @@ class Logger { | 
| // Returns whether profiler's sampler is active. | 
| bool IsProfilerSamplerActive(); | 
|  | 
| +  // Returns whether symbol callback is enabled. | 
| +  bool CodeAddressCallbackEnabled(); | 
| + | 
| // The sampler used by the profiler and the sliding state window. | 
| Ticker* ticker_; | 
|  | 
| @@ -425,6 +429,32 @@ class Logger { | 
| Address prev_code_; | 
|  | 
| friend class CpuProfiler; | 
| + | 
| +  friend class CodeAddressNotification; | 
| + | 
| +  int notified_reset_; | 
| +}; | 
| + | 
| + | 
| +class CodeAddressNotification { | 
| +public: | 
| +    // called by host to set callbacks - null turns off callbacks | 
| +    static void SetCodeAddressEventCallback(CodeAddressEvent cb, | 
| +                                            bool enumExisting); | 
| + | 
| +    // called by v8 when a symbol map is created or changed | 
| +    static void WriteSymbolMap(Logger* logger, | 
| +                               CodeAddressOperation op, | 
| +                               const void* addr1, | 
| +                               int len, | 
| +                               const char* symbol, | 
| +                               Logger::LogEventsAndTags tag, | 
| +                               const void* addr2, | 
| +                               int line); | 
| + | 
| +    // called by v8 to determine if callbacks are enabled | 
| +    static bool IsEnabled(); | 
| + | 
| }; | 
|  | 
|  | 
|  |