[wasm] Update counters after tier-up
Statistics need to be updated after top-tier code is added to the native module. Change-Id: Ie3a76caf233a2c3929b40fd0371c3069724b5289 Reviewed-on: https://chromium-review.googlesource.com/1027854 Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Commit-Queue: Kim-Anh Tran <kimanh@google.com> Cr-Commit-Position: refs/heads/master@{#52787}
This commit is contained in:
parent
76cab5ff78
commit
5ef33ea5a2
@ -1520,9 +1520,14 @@ class FinishCompileTask : public CancelableTask {
|
||||
// directly be used by Liftoff-compiled code. Therefore we need
|
||||
// to patch the compiled Turbofan function directly after finishing it.
|
||||
DCHECK_EQ(CompileMode::kTiering, compilation_state_->compile_mode());
|
||||
DCHECK(!result->is_liftoff());
|
||||
CodeSpecialization code_specialization;
|
||||
code_specialization.RelocateDirectCalls(native_module);
|
||||
code_specialization.ApplyToWasmCode(result);
|
||||
|
||||
// Update the counters to include the top-tier code.
|
||||
RecordStats(result,
|
||||
compilation_state_->isolate()->async_counters().get());
|
||||
}
|
||||
|
||||
// Update the compilation state, and possibly notify
|
||||
@ -3116,6 +3121,7 @@ class AsyncCompileJob::FinishModule : public CompileStep {
|
||||
class AsyncCompileJob::UpdateToTopTierCompiledCode : public CompileStep {
|
||||
void RunInForeground() override {
|
||||
TRACE_COMPILE("(7) Update native module to use optimized code...\n");
|
||||
|
||||
UpdateAllCompiledModulesWithTopTierCode(job_->compiled_module_);
|
||||
job_->isolate_->wasm_engine()->compilation_manager()->RemoveJob(job_);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user