Commit d684ece0 authored by yangguo's avatar yangguo Committed by Commit bot

Only add API-triggered compilation to compile-script histogram.

R=vogelheim@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26308}
parent 3c9f9851
......@@ -1598,6 +1598,7 @@ Local<UnboundScript> ScriptCompiler::CompileUnbound(
ENTER_V8(isolate);
i::SharedFunctionInfo* raw_result = NULL;
{ i::HandleScope scope(isolate);
i::HistogramTimerScope total(isolate->counters()->compile_script(), true);
i::Handle<i::Object> name_obj;
int line_offset = 0;
int column_offset = 0;
......
......@@ -1268,8 +1268,6 @@ Handle<SharedFunctionInfo> Compiler::CompileScript(
v8::Extension* extension, ScriptData** cached_data,
ScriptCompiler::CompileOptions compile_options, NativesFlag natives) {
Isolate* isolate = source->GetIsolate();
HistogramTimerScope total(isolate->counters()->compile_script(), true);
if (compile_options == ScriptCompiler::kNoCompileOptions) {
cached_data = NULL;
} else if (compile_options == ScriptCompiler::kProduceParserCache ||
......
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