Index: src/isolate.h |
diff --git a/src/isolate.h b/src/isolate.h |
old mode 100644 |
new mode 100755 |
index 76a5a41e70ab0b32502d10a5c9ed37ad22789985..99e4315863dedb45dcfb6b5132efddc1636e1935 |
--- a/src/isolate.h |
+++ b/src/isolate.h |
@@ -549,7 +549,7 @@ class Isolate { |
} |
Context** context_address() { return &thread_local_top_.context_; } |
- SaveContext* save_context() {return thread_local_top_.save_context_; } |
+ SaveContext* save_context() { return thread_local_top_.save_context_; } |
void set_save_context(SaveContext* save) { |
thread_local_top_.save_context_ = save; |
} |
@@ -1053,6 +1053,8 @@ class Isolate { |
context_exit_happened_ = context_exit_happened; |
} |
+ bool initialized_from_snapshot() { return initialized_from_snapshot_; } |
+ |
double time_millis_since_init() { |
return OS::TimeCurrentMillis() - time_millis_at_init_; |
} |
@@ -1110,6 +1112,16 @@ class Isolate { |
HStatistics* GetHStatistics(); |
HTracer* GetHTracer(); |
+ bool HasFunctionEntryHook() { |
+ return function_entry_hook_ != NULL && |
+ function_entry_hook_ != NullFunctionEntryHook; |
+ } |
+ FunctionEntryHook GetFunctionEntryHook(); |
+ void SetFunctionEntryHook(FunctionEntryHook function_entry_hook); |
+ FunctionEntryHook* function_entry_hook_location() { |
+ return &function_entry_hook_; |
+ } |
+ |
private: |
Isolate(); |
@@ -1190,6 +1202,12 @@ class Isolate { |
static void SetIsolateThreadLocals(Isolate* isolate, |
PerIsolateThreadData* data); |
+ // This function is used as a NULL sentry for the function entry point |
+ // callback. This allows shutting callbacks off per-isolate, even after |
+ // callbacks have been emitted into stubs and functions. |
+ static void NullFunctionEntryHook(uintptr_t function, |
+ uintptr_t return_addr_location); |
+ |
// Allocate and insert PerIsolateThreadData into the ThreadDataTable |
// (regardless of whether such data already exists). |
PerIsolateThreadData* AllocatePerIsolateThreadData(ThreadId thread_id); |
@@ -1292,6 +1310,9 @@ class Isolate { |
// that a context was recently exited. |
bool context_exit_happened_; |
+ // True if this isolate was initialized from a snapshot. |
+ bool initialized_from_snapshot_; |
+ |
// Time stamp at initialization. |
double time_millis_at_init_; |
@@ -1315,6 +1336,7 @@ class Isolate { |
#endif |
CpuProfiler* cpu_profiler_; |
HeapProfiler* heap_profiler_; |
+ FunctionEntryHook function_entry_hook_; |
#define GLOBAL_BACKING_STORE(type, name, initialvalue) \ |
type name##_; |