Introduce new compile histogram that includes parsing/caching.
authoryangguo <yangguo@chromium.org>
Wed, 14 Jan 2015 15:22:40 +0000 (07:22 -0800)
committerCommit bot <commit-bot@chromium.org>
Wed, 14 Jan 2015 15:22:51 +0000 (15:22 +0000)
R=vogelheim@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26059}

src/compiler.cc
src/counters.h

index 4cae3e6..0136e5b 100644 (file)
@@ -1264,6 +1264,8 @@ 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());
+
   if (compile_options == ScriptCompiler::kNoCompileOptions) {
     cached_data = NULL;
   } else if (compile_options == ScriptCompiler::kProduceParserCache ||
index 41107cf..cbd8093 100644 (file)
@@ -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)                                 \