Index: src/platform-linux.cc |
diff --git a/src/platform-linux.cc b/src/platform-linux.cc |
index 9bba93b8665c35a26fc6b1b82f54da6323c0bb9c..185b2fec52feae54a80b9eeacb92527ba4bfa761 100644 |
--- a/src/platform-linux.cc |
+++ b/src/platform-linux.cc |
@@ -727,15 +727,12 @@ static void ProfilerSignalHandler(int signal, siginfo_t* info, void* context) { |
if (signal != SIGPROF) return; |
if (active_sampler_ == NULL) return; |
-#ifdef ENABLE_CPP_PROFILES_PROCESSOR |
- TickSample* sample = CpuProfiler::TickSampleEvent(); |
- if (sample == NULL) return; |
- sample->pc = NULL; // Impossible value if sampling succeeds. |
- sample->frames_count = 0; |
-#else |
TickSample sample_obj; |
- TickSample* sample = &sample_obj; |
+ TickSample* sample = NULL; |
+#ifdef ENABLE_CPP_PROFILES_PROCESSOR |
+ sample = CpuProfiler::TickSampleEvent(); |
#endif |
+ if (sample == NULL) sample = &sample_obj; |
// We always sample the VM state. |
sample->state = VMState::current_state(); |
@@ -771,10 +768,9 @@ static void ProfilerSignalHandler(int signal, siginfo_t* info, void* context) { |
active_sampler_->SampleStack(sample); |
} |
} |
-#ifndef ENABLE_CPP_PROFILES_PROCESSOR |
+ |
active_sampler_->Tick(sample); |
#endif |
-#endif |
} |