Don't update the compilation size statistics when doing an optimized compile.
authortitzer@chromium.org <titzer@chromium.org>
Thu, 18 Sep 2014 08:47:13 +0000 (08:47 +0000)
committertitzer@chromium.org <titzer@chromium.org>
Thu, 18 Sep 2014 08:47:13 +0000 (08:47 +0000)
R=mstarzinger@chromium.org
BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24022 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/compiler.cc

index 074e4a2..ac8d83e 100644 (file)
@@ -1276,6 +1276,7 @@ MaybeHandle<Code> Compiler::GetOptimizedCode(Handle<JSFunction> function,
   if (shared->code()->kind() != Code::FUNCTION ||
       ScopeInfo::Empty(isolate) == shared->scope_info()) {
     // The function was never compiled. Compile it unoptimized first.
+    // TODO(titzer): reuse the AST and scope info from this compile.
     CompilationInfoWithZone nested(function);
     nested.EnableDeoptimizationSupport();
     if (!GetUnoptimizedCodeCommon(&nested).ToHandle(&current_code)) {
@@ -1283,8 +1284,6 @@ MaybeHandle<Code> Compiler::GetOptimizedCode(Handle<JSFunction> function,
     }
     shared->ReplaceCode(*current_code);
   }
-  int compiled_size = shared->end_position() - shared->start_position();
-  isolate->counters()->total_compile_size()->Increment(compiled_size);
   current_code->set_profiler_ticks(0);
 
   info->SetOptimizing(osr_ast_id, current_code);