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
This commit is contained in:
parent
97bce5e668
commit
892e6621f2
@ -1276,6 +1276,7 @@ MaybeHandle<Code> Compiler::GetOptimizedCode(Handle<JSFunction> function,
|
|||||||
if (shared->code()->kind() != Code::FUNCTION ||
|
if (shared->code()->kind() != Code::FUNCTION ||
|
||||||
ScopeInfo::Empty(isolate) == shared->scope_info()) {
|
ScopeInfo::Empty(isolate) == shared->scope_info()) {
|
||||||
// The function was never compiled. Compile it unoptimized first.
|
// The function was never compiled. Compile it unoptimized first.
|
||||||
|
// TODO(titzer): reuse the AST and scope info from this compile.
|
||||||
CompilationInfoWithZone nested(function);
|
CompilationInfoWithZone nested(function);
|
||||||
nested.EnableDeoptimizationSupport();
|
nested.EnableDeoptimizationSupport();
|
||||||
if (!GetUnoptimizedCodeCommon(&nested).ToHandle(¤t_code)) {
|
if (!GetUnoptimizedCodeCommon(&nested).ToHandle(¤t_code)) {
|
||||||
@ -1283,8 +1284,6 @@ MaybeHandle<Code> Compiler::GetOptimizedCode(Handle<JSFunction> function,
|
|||||||
}
|
}
|
||||||
shared->ReplaceCode(*current_code);
|
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);
|
current_code->set_profiler_ticks(0);
|
||||||
|
|
||||||
info->SetOptimizing(osr_ast_id, current_code);
|
info->SetOptimizing(osr_ast_id, current_code);
|
||||||
|
Loading…
Reference in New Issue
Block a user