Commit 5be70203 authored by alph@chromium.org's avatar alph@chromium.org

Make CPU profiler function names match ones from StackFrame iterator.

R=yangguo@chromium.org, yurys@chromium.org

Review URL: https://codereview.chromium.org/417253003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22845 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 2083600a
......@@ -222,16 +222,16 @@ void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag,
}
void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag,
Code* code,
void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, Code* code,
SharedFunctionInfo* shared,
CompilationInfo* info,
Name* name) {
CompilationInfo* info, Name* script_name) {
if (FilterOutCodeCreateEvent(tag)) return;
CodeEventsContainer evt_rec(CodeEventRecord::CODE_CREATION);
CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_;
rec->start = code->address();
rec->entry = profiles_->NewCodeEntry(tag, profiles_->GetFunctionName(name));
rec->entry = profiles_->NewCodeEntry(
tag, profiles_->GetFunctionName(shared->DebugName()),
CodeEntry::kEmptyNamePrefix, profiles_->GetName(script_name));
if (info) {
rec->entry->set_no_frame_ranges(info->ReleaseNoFrameRanges());
}
......@@ -248,21 +248,17 @@ void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag,
}
void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag,
Code* code,
void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, Code* code,
SharedFunctionInfo* shared,
CompilationInfo* info,
Name* source, int line, int column) {
CompilationInfo* info, Name* script_name,
int line, int column) {
if (FilterOutCodeCreateEvent(tag)) return;
CodeEventsContainer evt_rec(CodeEventRecord::CODE_CREATION);
CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_;
rec->start = code->address();
rec->entry = profiles_->NewCodeEntry(
tag,
profiles_->GetFunctionName(shared->DebugName()),
CodeEntry::kEmptyNamePrefix,
profiles_->GetName(source),
line,
tag, profiles_->GetFunctionName(shared->DebugName()),
CodeEntry::kEmptyNamePrefix, profiles_->GetName(script_name), line,
column);
if (info) {
rec->entry->set_no_frame_ranges(info->ReleaseNoFrameRanges());
......
......@@ -221,16 +221,13 @@ class CpuProfiler : public CodeEventListener {
Code* code, const char* comment);
virtual void CodeCreateEvent(Logger::LogEventsAndTags tag,
Code* code, Name* name);
virtual void CodeCreateEvent(Logger::LogEventsAndTags tag,
Code* code,
virtual void CodeCreateEvent(Logger::LogEventsAndTags tag, Code* code,
SharedFunctionInfo* shared,
CompilationInfo* info,
Name* name);
virtual void CodeCreateEvent(Logger::LogEventsAndTags tag,
Code* code,
CompilationInfo* info, Name* script_name);
virtual void CodeCreateEvent(Logger::LogEventsAndTags tag, Code* code,
SharedFunctionInfo* shared,
CompilationInfo* info,
Name* source, int line, int column);
CompilationInfo* info, Name* script_name,
int line, int column);
virtual void CodeCreateEvent(Logger::LogEventsAndTags tag,
Code* code, int args_count);
virtual void CodeMovingGCEvent() {}
......
......@@ -523,10 +523,7 @@ Handle<JSArray> Isolate::CaptureCurrentStackTrace(
}
if (options & StackTrace::kFunctionName) {
Handle<Object> fun_name(fun->shared()->name(), this);
if (!fun_name->BooleanValue()) {
fun_name = Handle<Object>(fun->shared()->inferred_name(), this);
}
Handle<Object> fun_name(fun->shared()->DebugName(), this);
JSObject::AddProperty(stack_frame, function_key, fun_name, NONE);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment