Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(360)

Unified Diff: src/cpu-profiler-inl.h

Issue 11193020: Revert recent CPU profiler changes because they broke --prof. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/cpu-profiler.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/cpu-profiler-inl.h
diff --git a/src/cpu-profiler-inl.h b/src/cpu-profiler-inl.h
index 1133b20fcb7f26bdd8a923969aae556a86f95b0b..4982197cabaf418006431f15d107fa29e6af8f2a 100644
--- a/src/cpu-profiler-inl.h
+++ b/src/cpu-profiler-inl.h
@@ -31,6 +31,7 @@
#include "cpu-profiler.h"
#include <new>
+#include "circular-queue-inl.h"
#include "profile-generator-inl.h"
#include "unbound-queue-inl.h"
@@ -55,18 +56,11 @@ void SharedFunctionInfoMoveEventRecord::UpdateCodeMap(CodeMap* code_map) {
}
-TickSample* ProfilerEventsProcessor::StartTickSampleEvent() {
- if (!ticks_buffer_is_empty_ || ticks_buffer_is_initialized_) return NULL;
- ticks_buffer_is_initialized_ = true;
+TickSample* ProfilerEventsProcessor::TickSampleEvent() {
generator_->Tick();
- ticks_buffer_ = TickSampleEventRecord(enqueue_order_);
- return &ticks_buffer_.sample;
-}
-
-
-void ProfilerEventsProcessor::FinishTickSampleEvent() {
- ASSERT(ticks_buffer_is_initialized_ && ticks_buffer_is_empty_);
- ticks_buffer_is_empty_ = false;
+ TickSampleEventRecord* evt =
+ new(ticks_buffer_.Enqueue()) TickSampleEventRecord(enqueue_order_);
+ return &evt->sample;
}
« no previous file with comments | « src/cpu-profiler.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698