| Index: src/cpu-profiler-inl.h
|
| diff --git a/src/cpu-profiler-inl.h b/src/cpu-profiler-inl.h
|
| index 868ec64fd61f60dc3ceb5f35a611518d3d75a06f..7bfbf5c57cb897f0ab7cf5b978f9285aab9e9cb5 100644
|
| --- a/src/cpu-profiler-inl.h
|
| +++ b/src/cpu-profiler-inl.h
|
| @@ -67,13 +67,30 @@ void ReportBuiltinEventRecord::UpdateCodeMap(CodeMap* code_map) {
|
| }
|
|
|
|
|
| -TickSample* ProfilerEventsProcessor::TickSampleEvent() {
|
| +TickSample* CpuProfiler::StartTickSample() {
|
| + if (is_profiling_) return processor_->StartTickSample();
|
| + return NULL;
|
| +}
|
| +
|
| +
|
| +void CpuProfiler::FinishTickSample() {
|
| + processor_->FinishTickSample();
|
| +}
|
| +
|
| +
|
| +TickSample* ProfilerEventsProcessor::StartTickSample() {
|
| + void* address = ticks_buffer_.StartEnqueue();
|
| + if (address == NULL) return NULL;
|
| TickSampleEventRecord* evt =
|
| - new(ticks_buffer_.Enqueue()) TickSampleEventRecord(last_code_event_id_);
|
| + new(address) TickSampleEventRecord(last_code_event_id_);
|
| return &evt->sample;
|
| }
|
|
|
|
|
| +void ProfilerEventsProcessor::FinishTickSample() {
|
| + ticks_buffer_.FinishEnqueue();
|
| +}
|
| +
|
| } } // namespace v8::internal
|
|
|
| #endif // V8_CPU_PROFILER_INL_H_
|
|
|