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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 | 178 |
179 // We're using on-stack replacement: patch the unoptimized code so that | 179 // We're using on-stack replacement: patch the unoptimized code so that |
180 // any back edge in any unoptimized frame will trigger on-stack | 180 // any back edge in any unoptimized frame will trigger on-stack |
181 // replacement for that frame. | 181 // replacement for that frame. |
182 if (FLAG_trace_osr) { | 182 if (FLAG_trace_osr) { |
183 PrintF("[OSR - patching back edges in "); | 183 PrintF("[OSR - patching back edges in "); |
184 function->PrintName(); | 184 function->PrintName(); |
185 PrintF("]\n"); | 185 PrintF("]\n"); |
186 } | 186 } |
187 | 187 |
188 Deoptimizer::PatchInterruptCode(isolate_, shared->code()); | 188 BackEdgeTable::Patch(isolate_, shared->code()); |
189 } | 189 } |
190 | 190 |
191 | 191 |
192 void RuntimeProfiler::ClearSampleBuffer() { | 192 void RuntimeProfiler::ClearSampleBuffer() { |
193 memset(sampler_window_, 0, sizeof(sampler_window_)); | 193 memset(sampler_window_, 0, sizeof(sampler_window_)); |
194 memset(sampler_window_weight_, 0, sizeof(sampler_window_weight_)); | 194 memset(sampler_window_weight_, 0, sizeof(sampler_window_weight_)); |
195 } | 195 } |
196 | 196 |
197 | 197 |
198 int RuntimeProfiler::LookupSample(JSFunction* function) { | 198 int RuntimeProfiler::LookupSample(JSFunction* function) { |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 | 429 |
430 | 430 |
431 void RuntimeProfiler::UpdateSamplesAfterCompact(ObjectVisitor* visitor) { | 431 void RuntimeProfiler::UpdateSamplesAfterCompact(ObjectVisitor* visitor) { |
432 for (int i = 0; i < kSamplerWindowSize; i++) { | 432 for (int i = 0; i < kSamplerWindowSize; i++) { |
433 visitor->VisitPointer(&sampler_window_[i]); | 433 visitor->VisitPointer(&sampler_window_[i]); |
434 } | 434 } |
435 } | 435 } |
436 | 436 |
437 | 437 |
438 } } // namespace v8::internal | 438 } } // namespace v8::internal |
OLD | NEW |