Index: src/runtime-profiler.h |
diff --git a/src/runtime-profiler.h b/src/runtime-profiler.h |
index 3656893ae783c556bf1215bba30c4ffc1c057f7d..692b4ffacc29c5e03a7f7f3d312cd641c0d806d0 100644 |
--- a/src/runtime-profiler.h |
+++ b/src/runtime-profiler.h |
@@ -44,7 +44,12 @@ class RuntimeProfiler { |
public: |
explicit RuntimeProfiler(Isolate* isolate); |
- static bool IsEnabled(); |
+ static void GlobalSetup(); |
+ |
+ static inline bool IsEnabled() { |
+ ASSERT(has_been_globally_setup_); |
+ return enabled_; |
+ } |
void OptimizeNow(); |
void OptimizeSoon(JSFunction* function); |
@@ -143,6 +148,11 @@ class RuntimeProfiler { |
// 0 or positive => the number of isolates running JavaScript code. |
static Atomic32 state_; |
static Semaphore* semaphore_; |
+ |
+#ifdef DEBUG |
+ static bool has_been_globally_setup_; |
+#endif |
+ static bool enabled_; |
}; |