From 31989f3b4dc768fad74e15f59dfa615d8affe27e Mon Sep 17 00:00:00 2001 From: "johnmccutchan@google.com" Date: Tue, 19 Nov 2013 19:11:41 +0000 Subject: [PATCH] Post landing fixes TBR Review URL: https://codereview.chromium.org//65983005 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30420 260f80e4-7a28-3924-810f-c04153c831b5 --- runtime/vm/profiler.cc | 4 ++++ runtime/vm/profiler_macos.cc | 4 ++-- runtime/vm/signal_handler.h | 4 ++-- tools/gyp/configurations_make.gypi | 1 - 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/runtime/vm/profiler.cc b/runtime/vm/profiler.cc index 24342d5c0da..66818e3b624 100644 --- a/runtime/vm/profiler.cc +++ b/runtime/vm/profiler.cc @@ -201,6 +201,10 @@ void ProfilerManager::ResizeIsolates(intptr_t new_capacity) { void ProfilerManager::AddIsolate(Isolate* isolate) { + if (isolates_ == NULL) { + // We are shutting down. + return; + } // Must be called with monitor_ locked. if (isolates_size_ == isolates_capacity_) { ResizeIsolates(isolates_capacity_ == 0 ? 16 : isolates_capacity_ * 2); diff --git a/runtime/vm/profiler_macos.cc b/runtime/vm/profiler_macos.cc index 83696797027..1a189f867dc 100644 --- a/runtime/vm/profiler_macos.cc +++ b/runtime/vm/profiler_macos.cc @@ -28,8 +28,8 @@ static void CollectSample(IsolateProfilerData* profiler_data, // Issue # 14777 sample->vm_tags = Sample::kExecuting; sample->runtime_tags = 0; - int64_t cpu_usage; - Thread::GetThreadCpuUsage(profiler_data->thread_id(), &cpu_usage); + int64_t cpu_usage = 0; + // TODO(johnmccutchan): Thread::GetThreadCpuUsage on MacOS. sample->cpu_usage = profiler_data->ComputeDeltaAndSetCpuUsage(cpu_usage); ProfilerSampleStackWalker stackWalker(sample, stack_lower, stack_upper, pc, fp, sp); diff --git a/runtime/vm/signal_handler.h b/runtime/vm/signal_handler.h index a16553c35dc..c584401ec52 100644 --- a/runtime/vm/signal_handler.h +++ b/runtime/vm/signal_handler.h @@ -12,8 +12,8 @@ #include // NOLINT #include // NOLINT #elif defined(TARGET_OS_ANDROID) -#include // NOLINT -#include // NOLINT +#include // NOLINT +#include // NOLINT #elif defined(TARGET_OS_MACOS) #include // NOLINT #include // NOLINT diff --git a/tools/gyp/configurations_make.gypi b/tools/gyp/configurations_make.gypi index be09f8f3e49..c58a63a32ad 100644 --- a/tools/gyp/configurations_make.gypi +++ b/tools/gyp/configurations_make.gypi @@ -20,7 +20,6 @@ '-Woverloaded-virtual', '-g3', '-ggdb3', - '-rdynamic', # TODO(iposva): Figure out if we need to pass anything else. #'-ansi', '-fno-rtti',