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.cc

Issue 941973002: CpuProfiler: eliminate cpu-profiler dependency from heap-inl.h (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: comments addressed Created 5 years, 10 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.h ('k') | src/cpu-profiler-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/cpu-profiler.cc
diff --git a/src/cpu-profiler.cc b/src/cpu-profiler.cc
index c276bb6d6079dcd065340b16a817681dc930f713..62a94112f682e8847245f9a560c879a184ff8a91 100644
--- a/src/cpu-profiler.cc
+++ b/src/cpu-profiler.cc
@@ -201,7 +201,6 @@ void CpuProfiler::CallbackEvent(Name* name, Address entry_point) {
Logger::CALLBACK_TAG,
profiles_->GetName(name));
rec->size = 1;
- rec->shared = NULL;
processor_->Enqueue(evt_rec);
}
@@ -218,7 +217,6 @@ void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag,
CodeEntry::kEmptyResourceName, CpuProfileNode::kNoLineNumberInfo,
CpuProfileNode::kNoColumnNumberInfo, NULL, code->instruction_start());
rec->size = code->ExecutableSize();
- rec->shared = NULL;
processor_->Enqueue(evt_rec);
}
@@ -235,7 +233,6 @@ void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag,
CodeEntry::kEmptyResourceName, CpuProfileNode::kNoLineNumberInfo,
CpuProfileNode::kNoColumnNumberInfo, NULL, code->instruction_start());
rec->size = code->ExecutableSize();
- rec->shared = NULL;
processor_->Enqueue(evt_rec);
}
@@ -255,15 +252,8 @@ void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, Code* code,
if (info) {
rec->entry->set_no_frame_ranges(info->ReleaseNoFrameRanges());
}
- if (shared->script()->IsScript()) {
- DCHECK(Script::cast(shared->script()));
- Script* script = Script::cast(shared->script());
- rec->entry->set_script_id(script->id()->value());
- rec->entry->set_bailout_reason(
- GetBailoutReason(shared->disable_optimization_reason()));
- }
+ rec->entry->FillFunctionInfo(shared);
rec->size = code->ExecutableSize();
- rec->shared = shared->address();
processor_->Enqueue(evt_rec);
}
@@ -299,11 +289,8 @@ void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, Code* code,
if (info) {
rec->entry->set_no_frame_ranges(info->ReleaseNoFrameRanges());
}
- rec->entry->set_script_id(script->id()->value());
+ rec->entry->FillFunctionInfo(shared);
rec->size = code->ExecutableSize();
- rec->shared = shared->address();
- rec->entry->set_bailout_reason(
- GetBailoutReason(shared->disable_optimization_reason()));
processor_->Enqueue(evt_rec);
}
@@ -320,7 +307,6 @@ void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag,
CodeEntry::kEmptyResourceName, CpuProfileNode::kNoLineNumberInfo,
CpuProfileNode::kNoColumnNumberInfo, NULL, code->instruction_start());
rec->size = code->ExecutableSize();
- rec->shared = NULL;
processor_->Enqueue(evt_rec);
}
@@ -360,16 +346,6 @@ void CpuProfiler::CodeDeleteEvent(Address from) {
}
-void CpuProfiler::SharedFunctionInfoMoveEvent(Address from, Address to) {
- CodeEventsContainer evt_rec(CodeEventRecord::SHARED_FUNC_MOVE);
- SharedFunctionInfoMoveEventRecord* rec =
- &evt_rec.SharedFunctionInfoMoveEventRecord_;
- rec->from = from;
- rec->to = to;
- processor_->Enqueue(evt_rec);
-}
-
-
void CpuProfiler::GetterCallbackEvent(Name* name, Address entry_point) {
if (FilterOutCodeCreateEvent(Logger::CALLBACK_TAG)) return;
CodeEventsContainer evt_rec(CodeEventRecord::CODE_CREATION);
@@ -380,7 +356,6 @@ void CpuProfiler::GetterCallbackEvent(Name* name, Address entry_point) {
profiles_->GetName(name),
"get ");
rec->size = 1;
- rec->shared = NULL;
processor_->Enqueue(evt_rec);
}
@@ -409,7 +384,6 @@ void CpuProfiler::SetterCallbackEvent(Name* name, Address entry_point) {
profiles_->GetName(name),
"set ");
rec->size = 1;
- rec->shared = NULL;
processor_->Enqueue(evt_rec);
}
« no previous file with comments | « src/cpu-profiler.h ('k') | src/cpu-profiler-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698