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

Side by Side Diff: src/arm/full-codegen-arm.cc

Issue 582683002: Remove deprecated ShouldSelfOptimize machinery. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixes after rebasing. Created 6 years, 1 month 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 | « no previous file | src/arm64/full-codegen-arm64.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 #if V8_TARGET_ARCH_ARM 7 #if V8_TARGET_ARCH_ARM
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 __ b(&return_label_); 417 __ b(&return_label_);
418 } else { 418 } else {
419 __ bind(&return_label_); 419 __ bind(&return_label_);
420 if (FLAG_trace) { 420 if (FLAG_trace) {
421 // Push the return value on the stack as the parameter. 421 // Push the return value on the stack as the parameter.
422 // Runtime::TraceExit returns its parameter in r0. 422 // Runtime::TraceExit returns its parameter in r0.
423 __ push(r0); 423 __ push(r0);
424 __ CallRuntime(Runtime::kTraceExit, 1); 424 __ CallRuntime(Runtime::kTraceExit, 1);
425 } 425 }
426 // Pretend that the exit is a backwards jump to the entry. 426 // Pretend that the exit is a backwards jump to the entry.
427 int weight = 1; 427 int distance = masm_->pc_offset();
428 if (info_->ShouldSelfOptimize()) { 428 int weight =
429 weight = FLAG_interrupt_budget / FLAG_self_opt_count; 429 Min(kMaxBackEdgeWeight, Max(1, distance / kCodeSizeMultiplier));
430 } else {
431 int distance = masm_->pc_offset();
432 weight = Min(kMaxBackEdgeWeight,
433 Max(1, distance / kCodeSizeMultiplier));
434 }
435 EmitProfilingCounterDecrement(weight); 430 EmitProfilingCounterDecrement(weight);
436 Label ok; 431 Label ok;
437 __ b(pl, &ok); 432 __ b(pl, &ok);
438 __ push(r0); 433 __ push(r0);
439 __ Call(isolate()->builtins()->InterruptCheck(), 434 __ Call(isolate()->builtins()->InterruptCheck(),
440 RelocInfo::CODE_TARGET); 435 RelocInfo::CODE_TARGET);
441 __ pop(r0); 436 __ pop(r0);
442 EmitProfilingCounterReset(); 437 EmitProfilingCounterReset();
443 __ bind(&ok); 438 __ bind(&ok);
444 439
(...skipping 4853 matching lines...) Expand 10 before | Expand all | Expand 10 after
5298 5293
5299 DCHECK(interrupt_address == 5294 DCHECK(interrupt_address ==
5300 isolate->builtins()->OsrAfterStackCheck()->entry()); 5295 isolate->builtins()->OsrAfterStackCheck()->entry());
5301 return OSR_AFTER_STACK_CHECK; 5296 return OSR_AFTER_STACK_CHECK;
5302 } 5297 }
5303 5298
5304 5299
5305 } } // namespace v8::internal 5300 } } // namespace v8::internal
5306 5301
5307 #endif // V8_TARGET_ARCH_ARM 5302 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698