Index: src/isolate.cc |
diff --git a/src/isolate.cc b/src/isolate.cc |
index 4970ec760871b793f71b5d8d3bd4dcfa086bd9c1..d6f84b70f6226c372cbd1e0d6aea027925a0df7f 100644 |
--- a/src/isolate.cc |
+++ b/src/isolate.cc |
@@ -338,7 +338,7 @@ Thread::LocalStorageKey Isolate::thread_id_key_; |
Thread::LocalStorageKey Isolate::per_isolate_thread_data_key_; |
Mutex* Isolate::process_wide_mutex_ = OS::CreateMutex(); |
Isolate::ThreadDataTable* Isolate::thread_data_table_ = NULL; |
- |
+Atomic32 Isolate::isolate_counter_ = 0; |
Isolate::PerIsolateThreadData* Isolate::AllocatePerIsolateThreadData( |
ThreadId thread_id) { |
@@ -1624,7 +1624,8 @@ void Isolate::ThreadDataTable::RemoveAllThreads(Isolate* isolate) { |
#define TRACE_ISOLATE(tag) \ |
do { \ |
if (FLAG_trace_isolates) { \ |
- PrintF("Isolate %p " #tag "\n", reinterpret_cast<void*>(this)); \ |
+ PrintF("Isolate %p (id %d)" #tag "\n", \ |
+ reinterpret_cast<void*>(this), id()); \ |
} \ |
} while (false) |
#else |
@@ -1684,6 +1685,7 @@ Isolate::Isolate() |
optimizing_compiler_thread_(this), |
marking_thread_(NULL), |
sweeper_thread_(NULL) { |
+ id_ = NoBarrier_AtomicIncrement(&isolate_counter_, 1); |
TRACE_ISOLATE(constructor); |
memset(isolate_addresses_, 0, |
@@ -2311,6 +2313,12 @@ void Isolate::UnlinkDeferredHandles(DeferredHandles* deferred) { |
} |
+HTracer* Isolate::GetHTracer() { |
+ if (htracer() == NULL) set_htracer(new HTracer(id())); |
+ return htracer(); |
+} |
+ |
+ |
CodeStubInterfaceDescriptor* |
Isolate::code_stub_interface_descriptor(int index) { |
return code_stub_interface_descriptors_ + index; |