Revision: 22845
Author: [email protected]
Date: Tue Aug 5 07:31:17 2014 UTC
Log: Make CPU profiler function names match ones from StackFrame
iterator.
[email protected], [email protected]
Review URL: https://codereview.chromium.org/417253003
http://code.google.com/p/v8/source/detail?r=22845
Modified:
/branches/bleeding_edge/src/cpu-profiler.cc
/branches/bleeding_edge/src/cpu-profiler.h
/branches/bleeding_edge/src/isolate.cc
=======================================
--- /branches/bleeding_edge/src/cpu-profiler.cc Mon Aug 4 11:34:54 2014 UTC
+++ /branches/bleeding_edge/src/cpu-profiler.cc Tue Aug 5 07:31:17 2014 UTC
@@ -222,16 +222,16 @@
}
-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,
- 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());
=======================================
--- /branches/bleeding_edge/src/cpu-profiler.h Mon Jun 30 13:25:46 2014 UTC
+++ /branches/bleeding_edge/src/cpu-profiler.h Tue Aug 5 07:31:17 2014 UTC
@@ -221,16 +221,13 @@
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() {}
=======================================
--- /branches/bleeding_edge/src/isolate.cc Mon Aug 4 11:34:54 2014 UTC
+++ /branches/bleeding_edge/src/isolate.cc Tue Aug 5 07:31:17 2014 UTC
@@ -523,10 +523,7 @@
}
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.