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

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

Issue 1635005: Allow new CPU profiling subsystem to coexist nicely with the old one. (Closed)
Patch Set: Fix TickSampleEvent Created 10 years, 8 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 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;
}
« 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