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

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

Issue 752613002: Revert "Remove deprecated ShouldSelfOptimize machinery." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « 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 distance = masm_->pc_offset(); 427 int weight = 1;
428 int weight = 428 if (info_->ShouldSelfOptimize()) {
429 Min(kMaxBackEdgeWeight, Max(1, distance / kCodeSizeMultiplier)); 429 weight = FLAG_interrupt_budget / FLAG_self_opt_count;
430 } else {
431 int distance = masm_->pc_offset();
432 weight = Min(kMaxBackEdgeWeight,
433 Max(1, distance / kCodeSizeMultiplier));
434 }
430 EmitProfilingCounterDecrement(weight); 435 EmitProfilingCounterDecrement(weight);
431 Label ok; 436 Label ok;
432 __ b(pl, &ok); 437 __ b(pl, &ok);
433 __ push(r0); 438 __ push(r0);
434 __ Call(isolate()->builtins()->InterruptCheck(), 439 __ Call(isolate()->builtins()->InterruptCheck(),
435 RelocInfo::CODE_TARGET); 440 RelocInfo::CODE_TARGET);
436 __ pop(r0); 441 __ pop(r0);
437 EmitProfilingCounterReset(); 442 EmitProfilingCounterReset();
438 __ bind(&ok); 443 __ bind(&ok);
439 444
(...skipping 4853 matching lines...) Expand 10 before | Expand all | Expand 10 after
5293 5298
5294 DCHECK(interrupt_address == 5299 DCHECK(interrupt_address ==
5295 isolate->builtins()->OsrAfterStackCheck()->entry()); 5300 isolate->builtins()->OsrAfterStackCheck()->entry());
5296 return OSR_AFTER_STACK_CHECK; 5301 return OSR_AFTER_STACK_CHECK;
5297 } 5302 }
5298 5303
5299 5304
5300 } } // namespace v8::internal 5305 } } // namespace v8::internal
5301 5306
5302 #endif // V8_TARGET_ARCH_ARM 5307 #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