Commit 6f43e1f5 authored by mstarzinger's avatar mstarzinger Committed by Commit bot

[profiler] Remove obsolete CompilationInfo argument.

This removes the CompilationInfo argument from one of the logging
functions where it is unused. The long-term goal is to not pass around
the CompilationInfo at all. The assumption that the CompilationInfo is
available is incompatible with serialized code, where compilation has
happened during building time of V8 itself.

R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/1901353003

Cr-Commit-Position: refs/heads/master@{#35705}
parent ff2a04bb
......@@ -1032,7 +1032,7 @@ Handle<SharedFunctionInfo> CompileToplevel(CompilationInfo* info) {
: Logger::ToNativeByScript(Logger::SCRIPT_TAG, *script);
PROFILE(isolate, CodeCreateEvent(log_tag, result->abstract_code(), *result,
info, *script_name));
*script_name));
if (!script.is_null())
script->set_compilation_state(Script::COMPILATION_STATE_COMPILED);
......
......@@ -180,8 +180,7 @@ void CodeEventLogger::CodeCreateEvent(Logger::LogEventsAndTags tag,
void CodeEventLogger::CodeCreateEvent(Logger::LogEventsAndTags tag,
AbstractCode* code,
SharedFunctionInfo* shared,
CompilationInfo* info, Name* name) {
SharedFunctionInfo* shared, Name* name) {
name_buffer_->Init(tag);
name_buffer_->AppendBytes(ComputeMarker(shared, code));
name_buffer_->AppendName(name);
......@@ -1118,12 +1117,11 @@ void Logger::CodeCreateEvent(LogEventsAndTags tag, AbstractCode* code,
}
void Logger::CodeCreateEvent(LogEventsAndTags tag, AbstractCode* code,
SharedFunctionInfo* shared, CompilationInfo* info,
Name* name) {
PROFILER_LOG(CodeCreateEvent(tag, code, shared, info, name));
SharedFunctionInfo* shared, Name* name) {
PROFILER_LOG(CodeCreateEvent(tag, code, shared, name));
if (!is_logging_code_events()) return;
CALL_LISTENERS(CodeCreateEvent(tag, code, shared, info, name));
CALL_LISTENERS(CodeCreateEvent(tag, code, shared, name));
if (!FLAG_log_code || !log_->IsEnabled()) return;
if (code == AbstractCode::cast(
......@@ -1618,10 +1616,9 @@ void Logger::LogExistingFunction(Handle<SharedFunctionInfo> shared,
*script_name, line_num, column_num));
} else {
// Can't distinguish eval and script here, so always use Script.
PROFILE(isolate_,
CodeCreateEvent(
Logger::ToNativeByScript(Logger::SCRIPT_TAG, *script),
*code, *shared, NULL, *script_name));
PROFILE(isolate_, CodeCreateEvent(Logger::ToNativeByScript(
Logger::SCRIPT_TAG, *script),
*code, *shared, *script_name));
}
} else {
PROFILE(isolate_,
......@@ -1644,9 +1641,8 @@ void Logger::LogExistingFunction(Handle<SharedFunctionInfo> shared,
PROFILE(isolate_, CallbackEvent(*func_name, entry_point));
}
} else {
PROFILE(isolate_,
CodeCreateEvent(
Logger::LAZY_COMPILE_TAG, *code, *shared, NULL, *func_name));
PROFILE(isolate_, CodeCreateEvent(Logger::LAZY_COMPILE_TAG, *code, *shared,
*func_name));
}
}
......
......@@ -224,8 +224,7 @@ class Logger {
const char* source);
void CodeCreateEvent(LogEventsAndTags tag, AbstractCode* code, Name* name);
void CodeCreateEvent(LogEventsAndTags tag, AbstractCode* code,
SharedFunctionInfo* shared, CompilationInfo* info,
Name* name);
SharedFunctionInfo* shared, Name* name);
void CodeCreateEvent(LogEventsAndTags tag, AbstractCode* code,
SharedFunctionInfo* shared, CompilationInfo* info,
Name* source, int line, int column);
......@@ -470,8 +469,7 @@ class CodeEventListener {
virtual void CodeCreateEvent(Logger::LogEventsAndTags tag, AbstractCode* code,
Name* name) = 0;
virtual void CodeCreateEvent(Logger::LogEventsAndTags tag, AbstractCode* code,
SharedFunctionInfo* shared,
CompilationInfo* info, Name* name) = 0;
SharedFunctionInfo* shared, Name* name) = 0;
virtual void CodeCreateEvent(Logger::LogEventsAndTags tag, AbstractCode* code,
SharedFunctionInfo* shared,
CompilationInfo* info, Name* source, int line,
......@@ -502,8 +500,7 @@ class CodeEventLogger : public CodeEventListener {
void CodeCreateEvent(Logger::LogEventsAndTags tag, AbstractCode* code,
int args_count) override;
void CodeCreateEvent(Logger::LogEventsAndTags tag, AbstractCode* code,
SharedFunctionInfo* shared, CompilationInfo* info,
Name* name) override;
SharedFunctionInfo* shared, Name* name) override;
void CodeCreateEvent(Logger::LogEventsAndTags tag, AbstractCode* code,
SharedFunctionInfo* shared, CompilationInfo* info,
Name* source, int line, int column) override;
......
......@@ -242,7 +242,7 @@ void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag,
void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag,
AbstractCode* code,
SharedFunctionInfo* shared,
CompilationInfo* info, Name* script_name) {
Name* script_name) {
CodeEventsContainer evt_rec(CodeEventRecord::CODE_CREATION);
CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_;
rec->start = code->address();
......@@ -253,9 +253,6 @@ void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag,
CpuProfileNode::kNoLineNumberInfo, CpuProfileNode::kNoColumnNumberInfo,
NULL, code->instruction_start());
RecordInliningInfo(rec->entry, code);
if (info) {
rec->entry->set_inlined_function_infos(info->inlined_function_infos());
}
rec->entry->FillFunctionInfo(shared);
rec->size = code->ExecutableSize();
processor_->Enqueue(evt_rec);
......
......@@ -226,8 +226,7 @@ class CpuProfiler : public CodeEventListener {
void CodeCreateEvent(Logger::LogEventsAndTags tag, AbstractCode* code,
Name* name) override;
void CodeCreateEvent(Logger::LogEventsAndTags tag, AbstractCode* code,
SharedFunctionInfo* shared, CompilationInfo* info,
Name* script_name) override;
SharedFunctionInfo* shared, Name* script_name) override;
void CodeCreateEvent(Logger::LogEventsAndTags tag, AbstractCode* code,
SharedFunctionInfo* shared, CompilationInfo* info,
Name* script_name, int line, int column) override;
......
......@@ -241,8 +241,8 @@ MaybeHandle<SharedFunctionInfo> CodeSerializer::Deserialize(
Script* script = Script::cast(result->script());
if (script->name()->IsString()) name = String::cast(script->name());
}
isolate->logger()->CodeCreateEvent(
Logger::SCRIPT_TAG, result->abstract_code(), *result, NULL, name);
isolate->logger()->CodeCreateEvent(Logger::SCRIPT_TAG,
result->abstract_code(), *result, name);
}
return scope.CloseAndEscape(result);
}
......
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