Commit c999da32 authored by Franziska Hinkelmann's avatar Franziska Hinkelmann Committed by Commit Bot

[profiler] Log code-source-info for each function

We were returning too early. Don't double-log the script, but log all
source-code-infos within it.

Bug: v8:7018
Change-Id: Icd29905ee1ae3444e30760cae0b0a18b55440335
Reviewed-on: https://chromium-review.googlesource.com/808165Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Franziska Hinkelmann <franzih@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49861}
parent 4048f5ff
...@@ -1049,10 +1049,7 @@ void Logger::CodeCreateEvent(CodeEventListener::LogEventsAndTags tag, ...@@ -1049,10 +1049,7 @@ void Logger::CodeCreateEvent(CodeEventListener::LogEventsAndTags tag,
// Make sure the script is written to the log file. // Make sure the script is written to the log file.
Script* script = Script::cast(script_object); Script* script = Script::cast(script_object);
int script_id = script->id(); int script_id = script->id();
if (logged_source_code_.find(script_id) != logged_source_code_.end()) { if (logged_source_code_.find(script_id) == logged_source_code_.end()) {
return;
}
// This script has not been logged yet. // This script has not been logged yet.
logged_source_code_.insert(script_id); logged_source_code_.insert(script_id);
Object* source_object = script->source(); Object* source_object = script->source();
...@@ -1071,6 +1068,7 @@ void Logger::CodeCreateEvent(CodeEventListener::LogEventsAndTags tag, ...@@ -1071,6 +1068,7 @@ void Logger::CodeCreateEvent(CodeEventListener::LogEventsAndTags tag,
msg << source_code; msg << source_code;
msg.WriteToLogFile(); msg.WriteToLogFile();
} }
}
// We log source code information in the form: // We log source code information in the form:
// //
......
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