[wasm] Reverse count logic for the tiering of js-to-wasm wrappers
This CL reverses the count logic for the tiering strategy of the js-to-wasm wrappers. The initial approach was that calls to each function were counted up, until a threshold was reached and the function would tier up. With this CL, each function is assigned a budget of calls that can be handled through the generic wrapper. Calls are counted down until the budget is exhausted, which will trigger the tier-up for the function. This approach comes with two advantages. Firstly, determining whether a function's budget is exhausted is as simple as checking the flags set from the decrement of the budget. Secondly, the code generated by the generic wrapper does not depend on the specific value of the initial budget. Bug: v8:10982 Change-Id: I5e186c6cf836a9c197b41d0f7ad075b07c87a4da Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2532300Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Vicky Kontoura <vkont@google.com> Cr-Commit-Position: refs/heads/master@{#71153}
Showing
Please
register
or
sign in
to comment