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

Unified Diff: src/cpu-profiler.cc

Issue 1514006: C++ profiles processor: put under #ifdef and fix issues. (Closed)
Patch Set: Created 10 years, 9 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
Index: src/cpu-profiler.cc
diff --git a/src/cpu-profiler.cc b/src/cpu-profiler.cc
index d16c17f4c0582413993a80f7c9fff4dcbc3086b3..4a215469fb2ddb551209ddcd4313a0717d3f8dbe 100644
--- a/src/cpu-profiler.cc
+++ b/src/cpu-profiler.cc
@@ -32,6 +32,7 @@
namespace v8 {
namespace internal {
+#ifdef ENABLE_CPP_PROFILES_PROCESSOR
static const int kEventsBufferSize = 256*KB;
static const int kTickSamplesBufferChunkSize = 64*KB;
@@ -163,7 +164,7 @@ bool ProfilerEventsProcessor::ProcessCodeEvent(unsigned* dequeue_order) {
bool ProfilerEventsProcessor::ProcessTicks(unsigned dequeue_order) {
while (true) {
const TickSampleEventRecord* rec =
- reinterpret_cast<TickSampleEventRecord*>(ticks_buffer_.StartDequeue());
+ TickSampleEventRecord::cast(ticks_buffer_.StartDequeue());
if (rec == NULL) return false;
if (rec->order == dequeue_order) {
generator_->RecordTickSample(rec->sample);
@@ -195,5 +196,6 @@ void ProfilerEventsProcessor::Run() {
while (ProcessTicks(dequeue_order) && ProcessCodeEvent(&dequeue_order)) { }
}
+#endif // ENABLE_CPP_PROFILES_PROCESSOR
} } // namespace v8::internal

Powered by Google App Engine
This is Rietveld 408576698