Commit 72a2e686 authored by ulan's avatar ulan Committed by Commit bot

Add trace event to V8 compiler API.

BUG=chromium:626256
LOG=NO

Review-Url: https://codereview.chromium.org/2126193002
Cr-Commit-Position: refs/heads/master@{#37578}
parent b36237b8
......@@ -1918,6 +1918,7 @@ MaybeLocal<UnboundScript> ScriptCompiler::CompileUnboundInternal(
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
PREPARE_FOR_EXECUTION_WITH_ISOLATE(isolate, ScriptCompiler, CompileUnbound,
UnboundScript);
TRACE_EVENT0("v8", "V8.ScriptCompiler");
// Don't try to produce any kind of cache when the debugger is loaded.
if (isolate->debug()->is_loaded() &&
......@@ -2078,6 +2079,7 @@ MaybeLocal<Function> ScriptCompiler::CompileFunctionInContext(
Local<Object> context_extensions[]) {
PREPARE_FOR_EXECUTION(v8_context, ScriptCompiler, CompileFunctionInContext,
Function);
TRACE_EVENT0("v8", "V8.ScriptCompiler");
i::Handle<i::String> source_string;
auto factory = isolate->factory();
if (arguments_count) {
......@@ -2192,6 +2194,7 @@ MaybeLocal<Script> ScriptCompiler::Compile(Local<Context> context,
Local<String> full_source_string,
const ScriptOrigin& origin) {
PREPARE_FOR_EXECUTION(context, ScriptCompiler, Compile, Script);
TRACE_EVENT0("v8", "V8.ScriptCompiler");
i::StreamedSource* source = v8_source->impl();
i::Handle<i::String> str = Utils::OpenHandle(*(full_source_string));
i::Handle<i::Script> script = isolate->factory()->NewScript(str);
......
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