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

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

Issue 23526069: Refactor back edge table related code into a new class. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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') | src/x64/deoptimizer-x64.cc » ('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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | src/x64/deoptimizer-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698