Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: src/runtime-profiler.cc

Issue 23710014: Introduce concurrent on-stack replacement. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/runtime.cc ('k') | test/mjsunit/compiler/optimized-for-in.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | test/mjsunit/compiler/optimized-for-in.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698