Index: src/platform-linux.cc |
=================================================================== |
--- src/platform-linux.cc (revision 5635) |
+++ src/platform-linux.cc (working copy) |
@@ -748,6 +748,7 @@ |
USE(info); |
if (signal != SIGPROF) return; |
if (active_sampler_ == NULL) return; |
+ if (!IsVmThread()) return; |
TickSample sample_obj; |
TickSample* sample = CpuProfiler::TickSampleEvent(); |
@@ -755,6 +756,7 @@ |
// We always sample the VM state. |
sample->state = VMState::current_state(); |
+ |
// If profiling, we extract the current pc and sp. |
if (active_sampler_->IsProfiling()) { |
// Extracting the sample from the context is extremely machine dependent. |
@@ -783,9 +785,7 @@ |
// Implement this on MIPS. |
UNIMPLEMENTED(); |
#endif |
- if (IsVmThread()) { |
- active_sampler_->SampleStack(sample); |
- } |
+ active_sampler_->SampleStack(sample); |
} |
active_sampler_->Tick(sample); |
@@ -806,7 +806,10 @@ |
Sampler::Sampler(int interval, bool profiling) |
- : interval_(interval), profiling_(profiling), active_(false) { |
+ : interval_(interval), |
+ profiling_(profiling), |
+ synchronous_(profiling), |
+ active_(false) { |
data_ = new PlatformData(); |
} |