Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Unified Diff: src/compiler.cc

Issue 1728593002: [Interpreter] Add support for cpu profiler logging. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler.h ('k') | src/compiler/code-generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index f267ec103141101db50b4bea1e4b2e611d08f566..0057a0b9fb3cef21a3421a5424d6cc8b7c7af20e 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -717,8 +717,9 @@ static void RecordFunctionCompilation(Logger::LogEventsAndTags tag,
if (info->isolate()->logger()->is_logging_code_events() ||
info->isolate()->cpu_profiler()->is_profiling()) {
Handle<Script> script = info->parse_info()->script();
- Handle<Code> code = info->code();
- if (code.is_identical_to(info->isolate()->builtins()->CompileLazy())) {
+ Handle<AbstractCode> abstract_code = info->abstract_code();
+ if (abstract_code.is_identical_to(
+ info->isolate()->builtins()->CompileLazy())) {
return;
}
int line_num = Script::GetLineNumber(script, shared->start_position()) + 1;
@@ -729,7 +730,7 @@ static void RecordFunctionCompilation(Logger::LogEventsAndTags tag,
: info->isolate()->heap()->empty_string();
Logger::LogEventsAndTags log_tag = Logger::ToNativeByScript(tag, *script);
PROFILE(info->isolate(),
- CodeCreateEvent(log_tag, *code, *shared, info, script_name,
+ CodeCreateEvent(log_tag, *abstract_code, *shared, info, script_name,
line_num, column_num));
}
}
@@ -824,9 +825,7 @@ MUST_USE_RESULT static MaybeHandle<Code> GetUnoptimizedCodeCommon(
// Compile either unoptimized code or bytecode for the interpreter.
if (!CompileBaselineCode(info)) return MaybeHandle<Code>();
- if (info->code()->kind() == Code::FUNCTION) { // Only for full code.
- RecordFunctionCompilation(Logger::LAZY_COMPILE_TAG, info, shared);
- }
+ RecordFunctionCompilation(Logger::LAZY_COMPILE_TAG, info, shared);
// Update the shared function info with the scope info. Allocating the
// ScopeInfo object may cause a GC.
@@ -1329,8 +1328,8 @@ static Handle<SharedFunctionInfo> CompileToplevel(CompilationInfo* info) {
? Logger::EVAL_TAG
: Logger::ToNativeByScript(Logger::SCRIPT_TAG, *script);
- PROFILE(isolate, CodeCreateEvent(
- log_tag, *info->code(), *result, info, *script_name));
+ PROFILE(isolate, CodeCreateEvent(log_tag, *info->abstract_code(), *result,
+ info, *script_name));
// Hint to the runtime system used when allocating space for initial
// property space by setting the expected number of properties for
« no previous file with comments | « src/compiler.h ('k') | src/compiler/code-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698