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

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

Issue 755883003: Refactor use of Isolate::use_crankshaft. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: remove bogus assert Created 6 years 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
« no previous file with comments | « src/objects.cc ('k') | src/runtime/runtime-compiler.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/runtime-profiler.h" 7 #include "src/runtime-profiler.h"
8 8
9 #include "src/assembler.h" 9 #include "src/assembler.h"
10 #include "src/base/platform/platform.h" 10 #include "src/base/platform/platform.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 for (int i = 0; i < loop_nesting_levels; i++) { 142 for (int i = 0; i < loop_nesting_levels; i++) {
143 BackEdgeTable::Patch(isolate_, shared->code()); 143 BackEdgeTable::Patch(isolate_, shared->code());
144 } 144 }
145 } 145 }
146 146
147 147
148 void RuntimeProfiler::OptimizeNow() { 148 void RuntimeProfiler::OptimizeNow() {
149 HandleScope scope(isolate_); 149 HandleScope scope(isolate_);
150 150
151 if (isolate_->DebuggerHasBreakPoints()) return; 151 if (!isolate_->use_crankshaft() || isolate_->DebuggerHasBreakPoints()) return;
152 152
153 DisallowHeapAllocation no_gc; 153 DisallowHeapAllocation no_gc;
154 154
155 // Run through the JavaScript frames and collect them. If we already 155 // Run through the JavaScript frames and collect them. If we already
156 // have a sample of the function, we mark it for optimizations 156 // have a sample of the function, we mark it for optimizations
157 // (eagerly or lazily). 157 // (eagerly or lazily).
158 int frame_count = 0; 158 int frame_count = 0;
159 int frame_count_limit = FLAG_frame_count; 159 int frame_count_limit = FLAG_frame_count;
160 for (JavaScriptFrameIterator it(isolate_); 160 for (JavaScriptFrameIterator it(isolate_);
161 frame_count++ < frame_count_limit && !it.done(); 161 frame_count++ < frame_count_limit && !it.done();
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 } 262 }
263 } else { 263 } else {
264 shared_code->set_profiler_ticks(ticks + 1); 264 shared_code->set_profiler_ticks(ticks + 1);
265 } 265 }
266 } 266 }
267 any_ic_changed_ = false; 267 any_ic_changed_ = false;
268 } 268 }
269 269
270 270
271 } } // namespace v8::internal 271 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/runtime/runtime-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698