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

Side by Side Diff: src/compiler.cc

Issue 879273003: Only add API-triggered compilation to compile-script histogram. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « src/api.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/compiler.h" 7 #include "src/compiler.h"
8 8
9 #include "src/ast-numbering.h" 9 #include "src/ast-numbering.h"
10 #include "src/ast-this-access-visitor.h" 10 #include "src/ast-this-access-visitor.h"
(...skipping 1250 matching lines...) Expand 10 before | Expand all | Expand 10 after
1261 shared_info, context, NOT_TENURED); 1261 shared_info, context, NOT_TENURED);
1262 } 1262 }
1263 1263
1264 1264
1265 Handle<SharedFunctionInfo> Compiler::CompileScript( 1265 Handle<SharedFunctionInfo> Compiler::CompileScript(
1266 Handle<String> source, Handle<Object> script_name, int line_offset, 1266 Handle<String> source, Handle<Object> script_name, int line_offset,
1267 int column_offset, bool is_shared_cross_origin, Handle<Context> context, 1267 int column_offset, bool is_shared_cross_origin, Handle<Context> context,
1268 v8::Extension* extension, ScriptData** cached_data, 1268 v8::Extension* extension, ScriptData** cached_data,
1269 ScriptCompiler::CompileOptions compile_options, NativesFlag natives) { 1269 ScriptCompiler::CompileOptions compile_options, NativesFlag natives) {
1270 Isolate* isolate = source->GetIsolate(); 1270 Isolate* isolate = source->GetIsolate();
1271 HistogramTimerScope total(isolate->counters()->compile_script(), true);
1272
1273 if (compile_options == ScriptCompiler::kNoCompileOptions) { 1271 if (compile_options == ScriptCompiler::kNoCompileOptions) {
1274 cached_data = NULL; 1272 cached_data = NULL;
1275 } else if (compile_options == ScriptCompiler::kProduceParserCache || 1273 } else if (compile_options == ScriptCompiler::kProduceParserCache ||
1276 compile_options == ScriptCompiler::kProduceCodeCache) { 1274 compile_options == ScriptCompiler::kProduceCodeCache) {
1277 DCHECK(cached_data && !*cached_data); 1275 DCHECK(cached_data && !*cached_data);
1278 DCHECK(extension == NULL); 1276 DCHECK(extension == NULL);
1279 DCHECK(!isolate->debug()->is_loaded()); 1277 DCHECK(!isolate->debug()->is_loaded());
1280 } else { 1278 } else {
1281 DCHECK(compile_options == ScriptCompiler::kConsumeParserCache || 1279 DCHECK(compile_options == ScriptCompiler::kConsumeParserCache ||
1282 compile_options == ScriptCompiler::kConsumeCodeCache); 1280 compile_options == ScriptCompiler::kConsumeCodeCache);
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
1583 AllowHandleDereference allow_deref; 1581 AllowHandleDereference allow_deref;
1584 bool tracing_on = info()->IsStub() 1582 bool tracing_on = info()->IsStub()
1585 ? FLAG_trace_hydrogen_stubs 1583 ? FLAG_trace_hydrogen_stubs
1586 : (FLAG_trace_hydrogen && 1584 : (FLAG_trace_hydrogen &&
1587 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); 1585 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter));
1588 return (tracing_on && 1586 return (tracing_on &&
1589 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); 1587 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL);
1590 } 1588 }
1591 1589
1592 } } // namespace v8::internal 1590 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698