Commit 2970249a authored by Pierre Langlois's avatar Pierre Langlois Committed by Commit Bot

[mjsunit] Do not generate compiler traces for the entire snapshot.

The `compiler-trace-flags.js` test just makes sure the various --trace-turbo*
flags do not cause V8 to crash. However, on builds with no snapshot, they would
generate a *lot* of output as they were tracing the compiler while generating
the snapshot.

Let's set the `--trace-turbo-filter` flag to make sure we only trace the test
functions. Sadly, WASM functions do not have a name, just an index, so we have
to split this test into two.

Bug: chromium:943064
Cq-Include-Trybots: luci.v8.try:v8_win_nosnap_shared_rel_ng
Change-Id: I30b3935f63d412ab8c96cc5156d342c428229865
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1532078Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/master@{#60383}
parent 2d9ec0a4
...@@ -353,7 +353,6 @@ ...@@ -353,7 +353,6 @@
'regress/regress-crbug-772056': [SKIP], 'regress/regress-crbug-772056': [SKIP],
'regress/regress-crbug-816961': [SKIP], 'regress/regress-crbug-816961': [SKIP],
'regress/wasm/*': [SKIP], 'regress/wasm/*': [SKIP],
'tools/compiler-trace-flags': [SKIP],
'regress/regress-8947': [SKIP], 'regress/regress-8947': [SKIP],
'wasm/*': [SKIP], 'wasm/*': [SKIP],
...@@ -385,6 +384,10 @@ ...@@ -385,6 +384,10 @@
'regress/regress-crbug-721835': [SKIP], 'regress/regress-crbug-721835': [SKIP],
'regress/regress-crbug-759327': [SKIP], 'regress/regress-crbug-759327': [SKIP],
'regress/regress-crbug-898974': [SKIP], 'regress/regress-crbug-898974': [SKIP],
# These tests check that we can trace the compiler.
'tools/compiler-trace-flags': [SKIP],
'tools/compiler-trace-flags-wasm': [SKIP]
}], # 'lite_mode or variant == jitless' }], # 'lite_mode or variant == jitless'
############################################################################## ##############################################################################
......
// Copyright 2019 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.
// Disable liftoff to make sure we generate turbofan traces.
// Flags: --no-liftoff
// Flags: --trace-turbo --trace-turbo-graph
// Flags: --trace-turbo-cfg-file=test/mjsunit/tools/turbo.cfg
// Flags: --trace-turbo-path=test/mjsunit/tools
// Only trace the wasm functions:
// Flags: --trace-turbo-filter=wasm*
load('test/mjsunit/wasm/wasm-module-builder.js');
// The idea behind this test is to make sure we do not crash when using the
// --trace-turbo flag given different sort of inputs.
(function testWASM() {
let builder = new WasmModuleBuilder();
builder.addFunction("add", kSig_i_ii)
.addBody([kExprGetLocal, 0,
kExprGetLocal, 1,
kExprI32Add])
.exportFunc();
let instance = builder.instantiate();
instance.exports.add(21, 21);
})();
...@@ -6,10 +6,11 @@ ...@@ -6,10 +6,11 @@
// Flags: --trace-turbo-cfg-file=test/mjsunit/tools/turbo.cfg // Flags: --trace-turbo-cfg-file=test/mjsunit/tools/turbo.cfg
// Flags: --trace-turbo-path=test/mjsunit/tools // Flags: --trace-turbo-path=test/mjsunit/tools
load('test/mjsunit/wasm/wasm-module-builder.js'); // Only trace the "add" function:
// Flags: --trace-turbo-filter=add
// The idea behind this test is to make sure we do not crash when using the // The idea behind this test is to make sure we do not crash when using the
// --trace-turbo flag given different sort of inputs, JS or WASM. // --trace-turbo flag given different sort of inputs.
(function testOptimizedJS() { (function testOptimizedJS() {
function add(a, b) { function add(a, b) {
...@@ -20,16 +21,3 @@ load('test/mjsunit/wasm/wasm-module-builder.js'); ...@@ -20,16 +21,3 @@ load('test/mjsunit/wasm/wasm-module-builder.js');
%OptimizeFunctionOnNextCall(add); %OptimizeFunctionOnNextCall(add);
add(20, 22); add(20, 22);
})(); })();
(function testWASM() {
let builder = new WasmModuleBuilder();
builder.addFunction("add", kSig_i_ii)
.addBody([kExprGetLocal, 0,
kExprGetLocal, 1,
kExprI32Add])
.exportFunc();
let instance = builder.instantiate();
instance.exports.add(21, 21);
})();
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