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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 if (FLAG_trace_osr) { | 142 if (FLAG_trace_osr) { |
143 PrintF("[patching stack checks in "); | 143 PrintF("[patching stack checks in "); |
144 function->PrintName(); | 144 function->PrintName(); |
145 PrintF(" for on-stack replacement]\n"); | 145 PrintF(" for on-stack replacement]\n"); |
146 } | 146 } |
147 | 147 |
148 // Get the stack check stub code object to match against. We aren't | 148 // Get the stack check stub code object to match against. We aren't |
149 // prepared to generate it, but we don't expect to have to. | 149 // prepared to generate it, but we don't expect to have to. |
150 bool found_code = false; | 150 bool found_code = false; |
151 Code* stack_check_code = NULL; | 151 Code* stack_check_code = NULL; |
| 152 #ifdef V8_TARGET_ARCH_IA32 |
152 if (FLAG_count_based_interrupts) { | 153 if (FLAG_count_based_interrupts) { |
153 InterruptStub interrupt_stub; | 154 InterruptStub interrupt_stub; |
154 found_code = interrupt_stub.FindCodeInCache(&stack_check_code); | 155 found_code = interrupt_stub.FindCodeInCache(&stack_check_code); |
155 } else { | 156 } else // NOLINT |
| 157 #endif |
| 158 { // NOLINT |
156 StackCheckStub check_stub; | 159 StackCheckStub check_stub; |
157 found_code = check_stub.FindCodeInCache(&stack_check_code); | 160 found_code = check_stub.FindCodeInCache(&stack_check_code); |
158 } | 161 } |
159 if (found_code) { | 162 if (found_code) { |
160 Code* replacement_code = | 163 Code* replacement_code = |
161 isolate_->builtins()->builtin(Builtins::kOnStackReplacement); | 164 isolate_->builtins()->builtin(Builtins::kOnStackReplacement); |
162 Code* unoptimized_code = shared->code(); | 165 Code* unoptimized_code = shared->code(); |
163 Deoptimizer::PatchStackCheckCode(unoptimized_code, | 166 Deoptimizer::PatchStackCheckCode(unoptimized_code, |
164 stack_check_code, | 167 stack_check_code, |
165 replacement_code); | 168 replacement_code); |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 // this as part of collecting them because this will interfere with | 300 // this as part of collecting them because this will interfere with |
298 // the sample lookup in case of recursive functions. | 301 // the sample lookup in case of recursive functions. |
299 for (int i = 0; i < sample_count; i++) { | 302 for (int i = 0; i < sample_count; i++) { |
300 AddSample(samples[i], kSamplerFrameWeight[i]); | 303 AddSample(samples[i], kSamplerFrameWeight[i]); |
301 } | 304 } |
302 } | 305 } |
303 } | 306 } |
304 | 307 |
305 | 308 |
306 void RuntimeProfiler::NotifyTick() { | 309 void RuntimeProfiler::NotifyTick() { |
| 310 #ifdef V8_TARGET_ARCH_IA32 |
307 if (FLAG_count_based_interrupts) return; | 311 if (FLAG_count_based_interrupts) return; |
| 312 #endif |
308 isolate_->stack_guard()->RequestRuntimeProfilerTick(); | 313 isolate_->stack_guard()->RequestRuntimeProfilerTick(); |
309 } | 314 } |
310 | 315 |
311 | 316 |
312 void RuntimeProfiler::SetUp() { | 317 void RuntimeProfiler::SetUp() { |
313 ASSERT(has_been_globally_set_up_); | 318 ASSERT(has_been_globally_set_up_); |
314 if (!FLAG_watch_ic_patching) { | 319 if (!FLAG_watch_ic_patching) { |
315 ClearSampleBuffer(); | 320 ClearSampleBuffer(); |
316 } | 321 } |
317 // If the ticker hasn't already started, make sure to do so to get | 322 // If the ticker hasn't already started, make sure to do so to get |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 | 430 |
426 bool RuntimeProfilerRateLimiter::SuspendIfNecessary() { | 431 bool RuntimeProfilerRateLimiter::SuspendIfNecessary() { |
427 if (!RuntimeProfiler::IsSomeIsolateInJS()) { | 432 if (!RuntimeProfiler::IsSomeIsolateInJS()) { |
428 return RuntimeProfiler::WaitForSomeIsolateToEnterJS(); | 433 return RuntimeProfiler::WaitForSomeIsolateToEnterJS(); |
429 } | 434 } |
430 return false; | 435 return false; |
431 } | 436 } |
432 | 437 |
433 | 438 |
434 } } // namespace v8::internal | 439 } } // namespace v8::internal |
OLD | NEW |