OLD | NEW |
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/runtime-profiler.h" | 5 #include "src/runtime-profiler.h" |
6 | 6 |
7 #include "src/assembler.h" | 7 #include "src/assembler.h" |
8 #include "src/base/platform/platform.h" | 8 #include "src/base/platform/platform.h" |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 MaybeOptimizeIgnition(function, frame); | 457 MaybeOptimizeIgnition(function, frame); |
458 } | 458 } |
459 } else { | 459 } else { |
460 DCHECK_EQ(next_tier, Compiler::OPTIMIZED); | 460 DCHECK_EQ(next_tier, Compiler::OPTIMIZED); |
461 MaybeOptimizeFullCodegen(function, frame, frame_count); | 461 MaybeOptimizeFullCodegen(function, frame, frame_count); |
462 } | 462 } |
463 | 463 |
464 // Update shared function info ticks after checking for whether functions | 464 // Update shared function info ticks after checking for whether functions |
465 // should be optimized to keep FCG (which updates ticks on code) and | 465 // should be optimized to keep FCG (which updates ticks on code) and |
466 // Ignition (which updates ticks on shared function info) in sync. | 466 // Ignition (which updates ticks on shared function info) in sync. |
467 List<SharedFunctionInfo*> functions(4); | 467 List<JSFunction*> functions(4); |
468 frame->GetFunctions(&functions); | 468 frame->GetFunctions(&functions); |
469 for (int i = functions.length(); --i >= 0;) { | 469 for (int i = functions.length(); --i >= 0;) { |
470 SharedFunctionInfo* shared_function_info = functions[i]; | 470 SharedFunctionInfo* shared_function_info = functions[i]->shared(); |
471 int ticks = shared_function_info->profiler_ticks(); | 471 int ticks = shared_function_info->profiler_ticks(); |
472 if (ticks < Smi::kMaxValue) { | 472 if (ticks < Smi::kMaxValue) { |
473 shared_function_info->set_profiler_ticks(ticks + 1); | 473 shared_function_info->set_profiler_ticks(ticks + 1); |
474 } | 474 } |
475 } | 475 } |
476 } | 476 } |
477 any_ic_changed_ = false; | 477 any_ic_changed_ = false; |
478 } | 478 } |
479 | 479 |
480 } // namespace internal | 480 } // namespace internal |
481 } // namespace v8 | 481 } // namespace v8 |
OLD | NEW |