From: yangguo Date: Wed, 14 Jan 2015 15:22:40 +0000 (-0800) Subject: Introduce new compile histogram that includes parsing/caching. X-Git-Tag: upstream/4.7.83~4981 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6586bd19fd8a9b15e569d0beb3dccb9d4ef95839;p=platform%2Fupstream%2Fv8.git Introduce new compile histogram that includes parsing/caching. R=vogelheim@chromium.org Review URL: https://codereview.chromium.org/851953003 Cr-Commit-Position: refs/heads/master@{#26059} --- diff --git a/src/compiler.cc b/src/compiler.cc index 4cae3e6..0136e5b 100644 --- a/src/compiler.cc +++ b/src/compiler.cc @@ -1264,6 +1264,8 @@ Handle Compiler::CompileScript( v8::Extension* extension, ScriptData** cached_data, ScriptCompiler::CompileOptions compile_options, NativesFlag natives) { Isolate* isolate = source->GetIsolate(); + HistogramTimerScope total(isolate->counters()->compile_script()); + if (compile_options == ScriptCompiler::kNoCompileOptions) { cached_data = NULL; } else if (compile_options == ScriptCompiler::kProduceParserCache || diff --git a/src/counters.h b/src/counters.h index 41107cf..cbd8093 100644 --- a/src/counters.h +++ b/src/counters.h @@ -309,12 +309,14 @@ class HistogramTimerScope BASE_EMBEDDED { HT(parse, V8.Parse) \ HT(parse_lazy, V8.ParseLazy) \ HT(pre_parse, V8.PreParse) \ - /* Total compilation times. */ \ + /* Compilation times. */ \ HT(compile, V8.Compile) \ HT(compile_eval, V8.CompileEval) \ /* Serialization as part of compilation (code caching) */ \ HT(compile_serialize, V8.CompileSerialize) \ - HT(compile_deserialize, V8.CompileDeserialize) + HT(compile_deserialize, V8.CompileDeserialize) \ + /* Total compilation time incl. caching/parsing */ \ + HT(compile_script, V8.CompileScript) #define HISTOGRAM_PERCENTAGE_LIST(HP) \