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 |