8820094a56
This fixes data races when lazily creating counters (and populating the {counter_map_}, and when concurrently adding samples to the counters. It also ensures that the Wasm engine is stopped (via {V8::Dispose}) before printing and deleting counters, as background threads might still try to update the counters otherwise. R=mlippautz@chromium.org CC=nikolaos@chromium.org Bug: v8:12453, chromium:1275117 Change-Id: Ie6beea6cc74eea52143d12f9921597da4a250f2a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3308710 Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/main@{#78191}
16 lines
528 B
JavaScript
16 lines
528 B
JavaScript
// Copyright 2021 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
// Flags: --dump-counters
|
|
|
|
d8.file.execute("test/mjsunit/wasm/wasm-module-builder.js");
|
|
|
|
(function testWasm() {
|
|
// Regression test for https://crbug.com/v8/12453.
|
|
if (typeof WebAssembly === 'undefined') return; // Skip on jitless.
|
|
const builder = new WasmModuleBuilder();
|
|
builder.addFunction('f', kSig_v_v).addBody([]);
|
|
builder.instantiate();
|
|
})();
|