Commit cf138bd3 authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[wasm][gc] Reset dead code counter when triggering GC

The {new_potentially_dead_code_size_} counter is used to decide when to
trigger the next GC. Without resetting, we will trigger lots of GCs
once the counter hits the limit, see
"V8.WasmModuleNumberOfCodeGCsTriggered" counter.

R=mstarzinger@chromium.org

Bug: v8:8217
Change-Id: I046b84d1f67f8cadb02fd3f876bb8c645e24edee
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1627340Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61795}
parent 5cf5992a
......@@ -827,6 +827,7 @@ void WasmEngine::FreeDeadCodeLocked(const DeadCodeMap& dead_code) {
void WasmEngine::TriggerGC(int8_t gc_sequence_index) {
DCHECK_NULL(current_gc_info_);
DCHECK(FLAG_wasm_code_gc);
new_potentially_dead_code_size_ = 0;
current_gc_info_.reset(new CurrentGCInfo(gc_sequence_index));
if (base::TimeTicks::IsHighResolution()) {
current_gc_info_->start_time = base::TimeTicks::Now();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment