Commit 0f39ef5f authored by alph's avatar alph Committed by Commit bot

[profiler] Do not report native function names as script names.

BUG=chromium:664286

Review-Url: https://codereview.chromium.org/2595673002
Cr-Commit-Position: refs/heads/master@{#41884}
parent a42c8c67
......@@ -90,7 +90,7 @@ class CodeEventListener {
virtual void CodeCreateEvent(LogEventsAndTags tag, AbstractCode* code,
Name* name) = 0;
virtual void CodeCreateEvent(LogEventsAndTags tag, AbstractCode* code,
SharedFunctionInfo* shared, Name* name) = 0;
SharedFunctionInfo* shared, Name* source) = 0;
virtual void CodeCreateEvent(LogEventsAndTags tag, AbstractCode* code,
SharedFunctionInfo* shared, Name* source,
int line, int column) = 0;
......
......@@ -1512,7 +1512,6 @@ void Logger::LogBytecodeHandlers() {
void Logger::LogExistingFunction(Handle<SharedFunctionInfo> shared,
Handle<AbstractCode> code) {
Handle<String> func_name(shared->DebugName());
if (shared->script()->IsScript()) {
Handle<Script> script(Script::cast(shared->script()));
int line_num = Script::GetLineNumber(script, shared->start_position()) + 1;
......@@ -1551,11 +1550,12 @@ void Logger::LogExistingFunction(Handle<SharedFunctionInfo> shared,
#if USES_FUNCTION_DESCRIPTORS
entry_point = *FUNCTION_ENTRYPOINT_ADDRESS(entry_point);
#endif
PROFILE(isolate_, CallbackEvent(*func_name, entry_point));
PROFILE(isolate_, CallbackEvent(shared->DebugName(), entry_point));
}
} else {
PROFILE(isolate_, CodeCreateEvent(CodeEventListener::LAZY_COMPILE_TAG,
*code, *shared, *func_name));
PROFILE(isolate_,
CodeCreateEvent(CodeEventListener::LAZY_COMPILE_TAG, *code, *shared,
isolate_->heap()->empty_string()));
}
}
......
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