Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/compiler.cc

Issue 2530423003: [compiler] Bailout reason "Optimized too many times" -> "Deoptimized..." (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/bailout-reason.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler.h" 5 #include "src/compiler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 9
10 #include "src/asmjs/asm-js.h" 10 #include "src/asmjs/asm-js.h"
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 // Do not use Crankshaft/TurboFan if we need to be able to set break points. 674 // Do not use Crankshaft/TurboFan if we need to be able to set break points.
675 if (info->shared_info()->HasDebugInfo()) { 675 if (info->shared_info()->HasDebugInfo()) {
676 info->AbortOptimization(kFunctionBeingDebugged); 676 info->AbortOptimization(kFunctionBeingDebugged);
677 return MaybeHandle<Code>(); 677 return MaybeHandle<Code>();
678 } 678 }
679 679
680 // Limit the number of times we try to optimize functions. 680 // Limit the number of times we try to optimize functions.
681 const int kMaxOptCount = 681 const int kMaxOptCount =
682 FLAG_deopt_every_n_times == 0 ? FLAG_max_opt_count : 1000; 682 FLAG_deopt_every_n_times == 0 ? FLAG_max_opt_count : 1000;
683 if (info->shared_info()->opt_count() > kMaxOptCount) { 683 if (info->shared_info()->opt_count() > kMaxOptCount) {
684 info->AbortOptimization(kOptimizedTooManyTimes); 684 info->AbortOptimization(kDeoptimizedTooManyTimes);
685 return MaybeHandle<Code>(); 685 return MaybeHandle<Code>();
686 } 686 }
687 687
688 TimerEventScope<TimerEventOptimizeCode> optimize_code_timer(isolate); 688 TimerEventScope<TimerEventOptimizeCode> optimize_code_timer(isolate);
689 RuntimeCallTimerScope runtimeTimer(isolate, &RuntimeCallStats::OptimizeCode); 689 RuntimeCallTimerScope runtimeTimer(isolate, &RuntimeCallStats::OptimizeCode);
690 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), "V8.OptimizeCode"); 690 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), "V8.OptimizeCode");
691 691
692 // TurboFan can optimize directly from existing bytecode. 692 // TurboFan can optimize directly from existing bytecode.
693 if (use_turbofan && ShouldUseIgnition(info)) { 693 if (use_turbofan && ShouldUseIgnition(info)) {
694 if (info->is_osr() && !ignition_osr) return MaybeHandle<Code>(); 694 if (info->is_osr() && !ignition_osr) return MaybeHandle<Code>();
(...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after
1728 DCHECK(shared->is_compiled()); 1728 DCHECK(shared->is_compiled());
1729 function->set_literals(cached.literals); 1729 function->set_literals(cached.literals);
1730 } else if (shared->is_compiled()) { 1730 } else if (shared->is_compiled()) {
1731 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. 1731 // TODO(mvstanton): pass pretenure flag to EnsureLiterals.
1732 JSFunction::EnsureLiterals(function); 1732 JSFunction::EnsureLiterals(function);
1733 } 1733 }
1734 } 1734 }
1735 1735
1736 } // namespace internal 1736 } // namespace internal
1737 } // namespace v8 1737 } // namespace v8
OLDNEW
« no previous file with comments | « src/bailout-reason.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698