Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(754)

Unified Diff: src/log.h

Issue 10837021: add ETW for V8 symbols
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/api.cc ('k') | src/log.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
+
};
« no previous file with comments | « src/api.cc ('k') | src/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698