Index: src/cpu-profiler-inl.h |
diff --git a/src/cpu-profiler-inl.h b/src/cpu-profiler-inl.h |
index 0e833156caa6bb2958426664f6f1f186b0682d0f..665bbd797379d1e815601552f25e66ed894c0586 100644 |
--- a/src/cpu-profiler-inl.h |
+++ b/src/cpu-profiler-inl.h |
@@ -39,28 +39,39 @@ namespace v8 { |
namespace internal { |
void CodeCreateEventRecord::UpdateCodeMap(CodeMap* code_map) { |
- code_map->AddCode(start, entry, size); |
+ code_map->AddCode(start, entry, size); |
} |
void CodeMoveEventRecord::UpdateCodeMap(CodeMap* code_map) { |
- code_map->MoveCode(from, to); |
+ code_map->MoveCode(from, to); |
} |
void CodeDeleteEventRecord::UpdateCodeMap(CodeMap* code_map) { |
- code_map->DeleteCode(start); |
+ code_map->DeleteCode(start); |
} |
void CodeAliasEventRecord::UpdateCodeMap(CodeMap* code_map) { |
- code_map->AddAlias(alias, start); |
+ code_map->AddAlias(alias, start); |
+} |
+ |
+ |
+TickSampleEventRecord* TickSampleEventRecord::init(void* value) { |
+ TickSampleEventRecord* result = |
+ reinterpret_cast<TickSampleEventRecord*>(value); |
+ result->filler = 1; // != SamplingCircularQueue::kClear. |
Søren Thygesen Gjesse
2010/04/12 06:56:28
Please add
ASSERT(result->filler = != SamplingCi
mnaganov (inactive)
2010/04/12 07:17:45
Done.
|
+ // Init the required fields only. |
+ result->sample.pc = NULL; |
+ result->sample.frames_count = 0; |
+ return result; |
} |
TickSample* ProfilerEventsProcessor::TickSampleEvent() { |
TickSampleEventRecord* evt = |
- TickSampleEventRecord::cast(ticks_buffer_.Enqueue()); |
+ TickSampleEventRecord::init(ticks_buffer_.Enqueue()); |
evt->order = enqueue_order_; // No increment! |
return &evt->sample; |
} |