| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 #endif | 81 #endif |
| 82 bool RuntimeProfiler::enabled_ = false; | 82 bool RuntimeProfiler::enabled_ = false; |
| 83 | 83 |
| 84 | 84 |
| 85 RuntimeProfiler::RuntimeProfiler(Isolate* isolate) | 85 RuntimeProfiler::RuntimeProfiler(Isolate* isolate) |
| 86 : isolate_(isolate), | 86 : isolate_(isolate), |
| 87 sampler_threshold_(kSamplerThresholdInit), | 87 sampler_threshold_(kSamplerThresholdInit), |
| 88 sampler_threshold_size_factor_(kSamplerThresholdSizeFactorInit), | 88 sampler_threshold_size_factor_(kSamplerThresholdSizeFactorInit), |
| 89 sampler_ticks_until_threshold_adjustment_( | 89 sampler_ticks_until_threshold_adjustment_( |
| 90 kSamplerTicksBetweenThresholdAdjustment), | 90 kSamplerTicksBetweenThresholdAdjustment), |
| 91 sampler_window_position_(0) { | 91 sampler_window_position_(0), |
| 92 any_ic_changed_(false), |
| 93 code_generated_(false) { |
| 92 ClearSampleBuffer(); | 94 ClearSampleBuffer(); |
| 93 } | 95 } |
| 94 | 96 |
| 95 | 97 |
| 96 void RuntimeProfiler::GlobalSetup() { | 98 void RuntimeProfiler::GlobalSetup() { |
| 97 ASSERT(!has_been_globally_set_up_); | 99 ASSERT(!has_been_globally_set_up_); |
| 98 enabled_ = V8::UseCrankshaft() && FLAG_opt; | 100 enabled_ = V8::UseCrankshaft() && FLAG_opt; |
| 99 #ifdef DEBUG | 101 #ifdef DEBUG |
| 100 has_been_globally_set_up_ = true; | 102 has_been_globally_set_up_ = true; |
| 101 #endif | 103 #endif |
| (...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 | 474 |
| 473 bool RuntimeProfilerRateLimiter::SuspendIfNecessary() { | 475 bool RuntimeProfilerRateLimiter::SuspendIfNecessary() { |
| 474 if (!RuntimeProfiler::IsSomeIsolateInJS()) { | 476 if (!RuntimeProfiler::IsSomeIsolateInJS()) { |
| 475 return RuntimeProfiler::WaitForSomeIsolateToEnterJS(); | 477 return RuntimeProfiler::WaitForSomeIsolateToEnterJS(); |
| 476 } | 478 } |
| 477 return false; | 479 return false; |
| 478 } | 480 } |
| 479 | 481 |
| 480 | 482 |
| 481 } } // namespace v8::internal | 483 } } // namespace v8::internal |
| OLD | NEW |