| Index: src/platform-freebsd.cc
|
| ===================================================================
|
| --- src/platform-freebsd.cc (revision 7267)
|
| +++ src/platform-freebsd.cc (working copy)
|
| @@ -156,7 +156,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;
|
| @@ -425,12 +425,15 @@
|
| }
|
|
|
|
|
| -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);
|
| }
|
|
|
| @@ -446,6 +449,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;
|
| }
|
| @@ -718,8 +722,9 @@
|
| }
|
|
|
|
|
| -Sampler::Sampler(int interval)
|
| - : interval_(interval),
|
| +Sampler::Sampler(Isolate* isolate, int interval)
|
| + : isolate_(isolate),
|
| + interval_(interval),
|
| profiling_(false),
|
| active_(false),
|
| samples_taken_(0) {
|
|
|