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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 *ic_total_count = info->ic_total_count(); | 133 *ic_total_count = info->ic_total_count(); |
134 } | 134 } |
135 *percentage = *ic_total_count > 0 | 135 *percentage = *ic_total_count > 0 |
136 ? 100 * *ic_with_type_info_count / *ic_total_count | 136 ? 100 * *ic_with_type_info_count / *ic_total_count |
137 : 100; | 137 : 100; |
138 } | 138 } |
139 | 139 |
140 | 140 |
141 void RuntimeProfiler::Optimize(JSFunction* function, const char* reason) { | 141 void RuntimeProfiler::Optimize(JSFunction* function, const char* reason) { |
142 ASSERT(function->IsOptimizable()); | 142 ASSERT(function->IsOptimizable()); |
| 143 // If we are in manual mode, don't auto-optimize anything. |
| 144 if (FLAG_manual_parallel_recompilation) return; |
| 145 |
143 if (FLAG_trace_opt) { | 146 if (FLAG_trace_opt) { |
144 PrintF("[marking "); | 147 PrintF("[marking "); |
145 function->PrintName(); | 148 function->PrintName(); |
146 PrintF(" 0x%" V8PRIxPTR, reinterpret_cast<intptr_t>(function->address())); | 149 PrintF(" 0x%" V8PRIxPTR, reinterpret_cast<intptr_t>(function->address())); |
147 PrintF(" for recompilation, reason: %s", reason); | 150 PrintF(" for recompilation, reason: %s", reason); |
148 if (FLAG_type_info_threshold > 0) { | 151 if (FLAG_type_info_threshold > 0) { |
149 int typeinfo, total, percentage; | 152 int typeinfo, total, percentage; |
150 GetICCounts(function, &typeinfo, &total, &percentage); | 153 GetICCounts(function, &typeinfo, &total, &percentage); |
151 PrintF(", ICs with typeinfo: %d/%d (%d%%)", typeinfo, total, percentage); | 154 PrintF(", ICs with typeinfo: %d/%d (%d%%)", typeinfo, total, percentage); |
152 } | 155 } |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 | 499 |
497 bool RuntimeProfilerRateLimiter::SuspendIfNecessary() { | 500 bool RuntimeProfilerRateLimiter::SuspendIfNecessary() { |
498 if (!RuntimeProfiler::IsSomeIsolateInJS()) { | 501 if (!RuntimeProfiler::IsSomeIsolateInJS()) { |
499 return RuntimeProfiler::WaitForSomeIsolateToEnterJS(); | 502 return RuntimeProfiler::WaitForSomeIsolateToEnterJS(); |
500 } | 503 } |
501 return false; | 504 return false; |
502 } | 505 } |
503 | 506 |
504 | 507 |
505 } } // namespace v8::internal | 508 } } // namespace v8::internal |
OLD | NEW |