| 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 | 165 |
| 166 // We are not prepared to do OSR for a function that already has an | 166 // We are not prepared to do OSR for a function that already has an |
| 167 // allocated arguments object. The optimized code would bypass it for | 167 // allocated arguments object. The optimized code would bypass it for |
| 168 // arguments accesses, which is unsound. Don't try OSR. | 168 // arguments accesses, which is unsound. Don't try OSR. |
| 169 if (shared->uses_arguments()) return; | 169 if (shared->uses_arguments()) return; |
| 170 | 170 |
| 171 // We're using on-stack replacement: patch the unoptimized code so that | 171 // We're using on-stack replacement: patch the unoptimized code so that |
| 172 // any back edge in any unoptimized frame will trigger on-stack | 172 // any back edge in any unoptimized frame will trigger on-stack |
| 173 // replacement for that frame. | 173 // replacement for that frame. |
| 174 if (FLAG_trace_osr) { | 174 if (FLAG_trace_osr) { |
| 175 PrintF("[patching back edges in "); | 175 PrintF("[OSR - patching back edges in "); |
| 176 function->PrintName(); | 176 function->PrintName(); |
| 177 PrintF(" for on-stack replacement]\n"); | 177 PrintF("]\n"); |
| 178 } | 178 } |
| 179 | 179 |
| 180 Deoptimizer::PatchInterruptCode(isolate_, shared->code()); | 180 Deoptimizer::PatchInterruptCode(isolate_, shared->code()); |
| 181 } | 181 } |
| 182 | 182 |
| 183 | 183 |
| 184 void RuntimeProfiler::ClearSampleBuffer() { | 184 void RuntimeProfiler::ClearSampleBuffer() { |
| 185 memset(sampler_window_, 0, sizeof(sampler_window_)); | 185 memset(sampler_window_, 0, sizeof(sampler_window_)); |
| 186 memset(sampler_window_weight_, 0, sizeof(sampler_window_weight_)); | 186 memset(sampler_window_weight_, 0, sizeof(sampler_window_weight_)); |
| 187 } | 187 } |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 | 425 |
| 426 | 426 |
| 427 void RuntimeProfiler::UpdateSamplesAfterCompact(ObjectVisitor* visitor) { | 427 void RuntimeProfiler::UpdateSamplesAfterCompact(ObjectVisitor* visitor) { |
| 428 for (int i = 0; i < kSamplerWindowSize; i++) { | 428 for (int i = 0; i < kSamplerWindowSize; i++) { |
| 429 visitor->VisitPointer(&sampler_window_[i]); | 429 visitor->VisitPointer(&sampler_window_[i]); |
| 430 } | 430 } |
| 431 } | 431 } |
| 432 | 432 |
| 433 | 433 |
| 434 } } // namespace v8::internal | 434 } } // namespace v8::internal |
| OLD | NEW |