Chromium Code Reviews| Index: src/cpu-profiler-inl.h |
| diff --git a/src/cpu-profiler-inl.h b/src/cpu-profiler-inl.h |
| index 4982197cabaf418006431f15d107fa29e6af8f2a..010f23f7e3e7138c7332a721a969ed6b3d41c76e 100644 |
| --- a/src/cpu-profiler-inl.h |
| +++ b/src/cpu-profiler-inl.h |
| @@ -31,7 +31,6 @@ |
| #include "cpu-profiler.h" |
| #include <new> |
| -#include "circular-queue-inl.h" |
| #include "profile-generator-inl.h" |
| #include "unbound-queue-inl.h" |
| @@ -56,11 +55,12 @@ void SharedFunctionInfoMoveEventRecord::UpdateCodeMap(CodeMap* code_map) { |
| } |
| -TickSample* ProfilerEventsProcessor::TickSampleEvent() { |
| +TickSample* ProfilerEventsProcessor::StartTickSampleEvent() { |
| + if (!ticks_buffer_is_empty_) |
| + return NULL; |
|
Jakob Kummerow
2012/09/04 11:25:18
Please either move this onto the same line as the
|
| generator_->Tick(); |
| - TickSampleEventRecord* evt = |
| - new(ticks_buffer_.Enqueue()) TickSampleEventRecord(enqueue_order_); |
| - return &evt->sample; |
| + ticks_buffer_ = TickSampleEventRecord(enqueue_order_); |
| + return &ticks_buffer_.sample; |
| } |