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

Unified Diff: src/arm64/full-codegen-arm64.cc

Issue 752613002: Revert "Remove deprecated ShouldSelfOptimize machinery." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/ast.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm64/full-codegen-arm64.cc
diff --git a/src/arm64/full-codegen-arm64.cc b/src/arm64/full-codegen-arm64.cc
index bdbe35ec338f7ece5cb758e734363cff6c513c22..710956ffd304b4f67297294a8448187246c8d805 100644
--- a/src/arm64/full-codegen-arm64.cc
+++ b/src/arm64/full-codegen-arm64.cc
@@ -413,9 +413,14 @@ void FullCodeGenerator::EmitReturnSequence() {
DCHECK(x0.Is(result_register()));
}
// Pretend that the exit is a backwards jump to the entry.
- int distance = masm_->pc_offset() + kCodeSizeMultiplier / 2;
- int weight =
- Min(kMaxBackEdgeWeight, Max(1, distance / kCodeSizeMultiplier));
+ int weight = 1;
+ if (info_->ShouldSelfOptimize()) {
+ weight = FLAG_interrupt_budget / FLAG_self_opt_count;
+ } else {
+ int distance = masm_->pc_offset() + kCodeSizeMultiplier / 2;
+ weight = Min(kMaxBackEdgeWeight,
+ Max(1, distance / kCodeSizeMultiplier));
+ }
EmitProfilingCounterDecrement(weight);
Label ok;
__ B(pl, &ok);
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/ast.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698