[nci] Don't clobber interrupt budget after runtime profiler

The %BytecodeBudgetInterruptFromCode call resets the interrupt budget;
prior to this CL we'd overwrite the value immediately after returning
from runtime, resulting in repeated runtime calls.

Drive-by: Add the interrupt budget to FeedbackCell's debug print.

Bug: v8:8888
Change-Id: I2c98b839b8630a9e14df3d8a724e03c5afbec687
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2400991
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69777}
This commit is contained in:
Jakob Gruber 2020-09-09 15:17:18 +02:00 committed by Commit Bot
parent 0ed32e646d
commit d68fb4733e
2 changed files with 4 additions and 3 deletions

View File

@ -3682,6 +3682,8 @@ Node* EffectControlLinearizer::LowerUpdateInterruptBudget(Node* node) {
TNode<Int32T> budget = __ LoadField<Int32T>(
AccessBuilder::ForFeedbackCellInterruptBudget(), feedback_cell);
Node* new_budget = __ Int32Add(budget, __ Int32Constant(n.delta()));
__ StoreField(AccessBuilder::ForFeedbackCellInterruptBudget(), feedback_cell,
new_budget);
if (n.delta() < 0) {
auto next = __ MakeLabel();
auto if_budget_exhausted = __ MakeDeferredLabel();
@ -3695,8 +3697,6 @@ Node* EffectControlLinearizer::LowerUpdateInterruptBudget(Node* node) {
__ Bind(&next);
}
__ StoreField(AccessBuilder::ForFeedbackCellInterruptBudget(), feedback_cell,
new_budget);
return nullptr;
}

View File

@ -874,7 +874,8 @@ void FeedbackCell::FeedbackCellPrint(std::ostream& os) { // NOLINT
} else {
os << "\n - Invalid FeedbackCell map";
}
os << " - value: " << Brief(value());
os << "\n - value: " << Brief(value());
os << "\n - interrupt_budget: " << interrupt_budget();
os << "\n";
}