From 892e6621f2c4d541d3772a24bbe3a7cadff5ab31 Mon Sep 17 00:00:00 2001 From: "titzer@chromium.org" Date: Thu, 18 Sep 2014 08:47:13 +0000 Subject: [PATCH] Don't update the compilation size statistics when doing an optimized compile. 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 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/compiler.cc b/src/compiler.cc index 074e4a2..ac8d83e 100644 --- a/src/compiler.cc +++ b/src/compiler.cc @@ -1276,6 +1276,7 @@ MaybeHandle Compiler::GetOptimizedCode(Handle 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(¤t_code)) { @@ -1283,8 +1284,6 @@ MaybeHandle Compiler::GetOptimizedCode(Handle 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); -- 2.7.4