Commit 993f0f8f authored by Sathya Gunasekaran's avatar Sathya Gunasekaran Committed by Commit Bot

Revert "[inspector] Add wasm profiling test"

This reverts commit 6202c445.

Reason for revert: times out on arm https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket.appspot.com/8921075891748393232/+/steps/Check_-_default/0/logs/console-profile-wasm/0

Original change's description:
> [inspector] Add wasm profiling test
> 
> This adds a first simple test to check that CPU profiles contain wasm
> function names.
> 
> R=​herhut@chromium.org, kozyatinskiy@chromium.org
> 
> Bug: v8:8783
> Change-Id: I26b1fd2b7ec555c073d80a464ee8a799b017b07a
> Reviewed-on: https://chromium-review.googlesource.com/c/1454597
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Reviewed-by: Stephan Herhut <herhut@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#59703}

TBR=yangguo@chromium.org,kozyatinskiy@chromium.org,clemensh@chromium.org,herhut@chromium.org

Change-Id: Ib211a38a32ee08c18e4a19f05d9fc68d6a2d2901
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8783
Reviewed-on: https://chromium-review.googlesource.com/c/1475914Reviewed-by: 's avatarSathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59704}
parent 6202c445
Test that console profiles contain wasm function names.
Compiling wasm.
Running fib with increasing input until it shows up in the profile.
Found fib in profile.
// 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.
let {session, contextGroup, Protocol} = InspectorTest.start(
'Test that console profiles contain wasm function names.');
utils.load('test/mjsunit/wasm/wasm-module-builder.js');
// Add fibonacci function.
var builder = new WasmModuleBuilder();
builder.addFunction('fib', kSig_i_i)
.addBody([
kExprGetLocal, 0,
kExprGetLocal, 0,
kExprI32Const, 2,
kExprI32LeS, // i < 2 ?
kExprBrIf, 0, // --> return i
kExprI32Const, 1, kExprI32Sub, // i - 1
kExprCallFunction, 0, // fib(i - 1)
kExprGetLocal, 0, kExprI32Const, 2, kExprI32Sub, // i - 2
kExprCallFunction, 0, // fib(i - 2)
kExprI32Add
])
.exportFunc();
let module_bytes = builder.toArray();
function compile(bytes) {
let buffer = new ArrayBuffer(bytes.length);
let view = new Uint8Array(buffer);
for (var i = 0; i < bytes.length; i++) {
view[i] = bytes[i] | 0;
}
let module = new WebAssembly.Module(buffer);
let instance = new WebAssembly.Instance(module);
return instance;
}
function checkError(message)
{
if (message.error) {
InspectorTest.log("Error: ");
InspectorTest.logMessage(message);
InspectorTest.completeTest();
}
}
(async function test() {
Protocol.Profiler.enable();
checkError(await Protocol.Profiler.start());
let found_fib_in_profile = false;
let finished_profiles = 0;
Protocol.Profiler.onConsoleProfileFinished(e => {
++finished_profiles;
if (e.params.profile.nodes.some(n => n.callFrame.functionName === 'fib'))
found_fib_in_profile = true;
});
InspectorTest.log('Compiling wasm.');
checkError(await Protocol.Runtime.evaluate({
expression: 'const instance = (' + compile + ')(' +
JSON.stringify(module_bytes) + ');'
}));
InspectorTest.log(
'Running fib with increasing input until it shows up in the profile.');
for (let i = 1; !found_fib_in_profile; ++i) {
checkError(await Protocol.Runtime.evaluate(
{expression: 'console.profile(\'profile\');'}));
checkError(await Protocol.Runtime.evaluate(
{expression: 'instance.exports.fib(' + i + ');'}));
checkError(await Protocol.Runtime.evaluate(
{expression: 'console.profileEnd(\'profile\');'}));
if (finished_profiles != i) {
InspectorTest.log(
'Missing consoleProfileFinished message (expected ' + i + ', got ' +
finished_profiles + ')');
}
}
InspectorTest.log('Found fib in profile.');
InspectorTest.completeTest();
})().catch(e => InspectorTest.log('caught: ' + e));
......@@ -53,7 +53,6 @@
##############################################################################
['variant == jitless', {
# https://crbug.com/v8/7777
'cpu-profiler/console-profile-wasm': [SKIP],
'cpu-profiler/coverage': [SKIP],
'cpu-profiler/coverage-block': [SKIP],
}], # variant == jitless
......
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