v8/test/mjsunit/tools/compiler-trace-flags.js
Pierre Langlois 2970249a72 [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/+/1532078
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Cr-Commit-Position: refs/heads/master@{#60383}
2019-03-21 09:01:29 +00:00

24 lines
695 B
JavaScript

// Copyright 2018 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: --allow-natives-syntax --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 "add" function:
// Flags: --trace-turbo-filter=add
// 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 testOptimizedJS() {
function add(a, b) {
return a + b;
}
add(21, 21);
%OptimizeFunctionOnNextCall(add);
add(20, 22);
})();