Reviewers: yurys, loislo,
Description:
Make CPU profiler function names match ones from StackFrame iterator.
Please review this at https://codereview.chromium.org/417253003/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+4, -5 lines):
M src/cpu-profiler.cc
M src/isolate.cc
Index: src/cpu-profiler.cc
diff --git a/src/cpu-profiler.cc b/src/cpu-profiler.cc
index
54fec77a2a3a3b6f087ffd546ba5cd1221546321..eb6868caf0a1d9fb0e1ae0409d4d6746b6932af7
100644
--- a/src/cpu-profiler.cc
+++ b/src/cpu-profiler.cc
@@ -231,7 +231,9 @@ void
CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag,
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(name));
if (info) {
rec->entry->set_no_frame_ranges(info->ReleaseNoFrameRanges());
}
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index
39dcc2647d30dfb653c3dbe136a321441e028889..9aa5d2396565d8134d20de9fcdac5cfcdbffa3ed
100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -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);
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.