| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 PrintF(" 0x%" V8PRIxPTR, reinterpret_cast<intptr_t>(function->address())); | 137 PrintF(" 0x%" V8PRIxPTR, reinterpret_cast<intptr_t>(function->address())); |
| 138 PrintF(" for recompilation, reason: %s", reason); | 138 PrintF(" for recompilation, reason: %s", reason); |
| 139 if (FLAG_type_info_threshold > 0) { | 139 if (FLAG_type_info_threshold > 0) { |
| 140 int typeinfo, total, percentage; | 140 int typeinfo, total, percentage; |
| 141 GetICCounts(function, &typeinfo, &total, &percentage); | 141 GetICCounts(function, &typeinfo, &total, &percentage); |
| 142 PrintF(", ICs with typeinfo: %d/%d (%d%%)", typeinfo, total, percentage); | 142 PrintF(", ICs with typeinfo: %d/%d (%d%%)", typeinfo, total, percentage); |
| 143 } | 143 } |
| 144 PrintF("]\n"); | 144 PrintF("]\n"); |
| 145 } | 145 } |
| 146 | 146 |
| 147 // The next call to the function will trigger optimization. | 147 if (FLAG_optimize_in_parallel) { |
| 148 function->MarkForLazyRecompilation(); | 148 function->RecompileInParallel(); |
| 149 } else { |
| 150 function->MarkForLazyRecompilation(); |
| 151 } |
| 149 } | 152 } |
| 150 | 153 |
| 151 | 154 |
| 152 void RuntimeProfiler::AttemptOnStackReplacement(JSFunction* function) { | 155 void RuntimeProfiler::AttemptOnStackReplacement(JSFunction* function) { |
| 153 // See AlwaysFullCompiler (in compiler.cc) comment on why we need | 156 // See AlwaysFullCompiler (in compiler.cc) comment on why we need |
| 154 // Debug::has_break_points(). | 157 // Debug::has_break_points(). |
| 155 ASSERT(function->IsMarkedForLazyRecompilation()); | 158 ASSERT(function->IsMarkedForLazyRecompilation()); |
| 156 if (!FLAG_use_osr || | 159 if (!FLAG_use_osr || |
| 157 isolate_->DebuggerHasBreakPoints() || | 160 isolate_->DebuggerHasBreakPoints() || |
| 158 function->IsBuiltin()) { | 161 function->IsBuiltin()) { |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 | 467 |
| 465 bool RuntimeProfilerRateLimiter::SuspendIfNecessary() { | 468 bool RuntimeProfilerRateLimiter::SuspendIfNecessary() { |
| 466 if (!RuntimeProfiler::IsSomeIsolateInJS()) { | 469 if (!RuntimeProfiler::IsSomeIsolateInJS()) { |
| 467 return RuntimeProfiler::WaitForSomeIsolateToEnterJS(); | 470 return RuntimeProfiler::WaitForSomeIsolateToEnterJS(); |
| 468 } | 471 } |
| 469 return false; | 472 return false; |
| 470 } | 473 } |
| 471 | 474 |
| 472 | 475 |
| 473 } } // namespace v8::internal | 476 } } // namespace v8::internal |
| OLD | NEW |