Index: src/platform-openbsd.cc |
=================================================================== |
--- src/platform-openbsd.cc (revision 7267) |
+++ src/platform-openbsd.cc (working copy) |
@@ -154,7 +154,7 @@ |
void* mbase = mmap(NULL, msize, prot, MAP_PRIVATE | MAP_ANON, -1, 0); |
if (mbase == MAP_FAILED) { |
- LOG(StringEvent("OS::Allocate", "mmap failed")); |
+ LOG(ISOLATE, StringEvent("OS::Allocate", "mmap failed")); |
return NULL; |
} |
*allocated = msize; |
@@ -400,12 +400,16 @@ |
} |
-Thread::Thread() : ThreadHandle(ThreadHandle::INVALID) { |
+Thread::Thread(Isolate* isolate) |
+ : ThreadHandle(ThreadHandle::INVALID), |
+ isolate_(isolate) { |
set_name("v8:<unknown>"); |
} |
-Thread::Thread(const char* name) : ThreadHandle(ThreadHandle::INVALID) { |
+Thread::Thread(Isolate* isolate, const char* name) |
+ : ThreadHandle(ThreadHandle::INVALID), |
+ isolate_(isolate) { |
set_name(name); |
} |
@@ -421,6 +425,7 @@ |
// one) so we initialize it here too. |
thread->thread_handle_data()->thread_ = pthread_self(); |
ASSERT(thread->IsValid()); |
+ Thread::SetThreadLocal(Isolate::isolate_key(), thread->isolate()); |
thread->Run(); |
return NULL; |
} |
@@ -598,8 +603,9 @@ |
}; |
-Sampler::Sampler(int interval) |
- : interval_(interval), |
+Sampler::Sampler(Isolate* isolate, int interval) |
+ : isolate_(isolate), |
+ interval_(interval), |
profiling_(false), |
active_(false), |
samples_taken_(0) { |