Skip to content

Commit

Permalink
test: adapt test-linux-perf to V8 changes
Browse files Browse the repository at this point in the history
Refs: v8/v8@9a31804

PR-URL: #38273
Backport-PR-URL: #38991
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Mary Marchini <oss@mmarchini.me>
  • Loading branch information
targos committed Jun 14, 2021
1 parent 32961c4 commit 1816d46
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions test/v8-updates/test-linux-perf.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,20 @@ for (const perfArgs of perfArgsList) {
output += perfScript.stdout;
}

const interpretedFunctionOneRe = /InterpretedFunction:functionOne/;
const compiledFunctionOneRe = /LazyCompile:\*functionOne/;
const interpretedFunctionTwoRe = /InterpretedFunction:functionTwo/;
const compiledFunctionTwoRe = /LazyCompile:\*functionTwo/;
const interpretedFunctionOneRe = /~functionOne/;
const compiledFunctionOneRe = /\*functionOne/;
const interpretedFunctionTwoRe = /~functionTwo/;
const compiledFunctionTwoRe = /\*functionTwo/;

function makeAssertMessage(message) {
return message + '\nPerf output:\n\n' + output;
}

assert.ok(output.match(interpretedFunctionOneRe),
"Couldn't find interpreted functionOne()");
makeAssertMessage("Couldn't find interpreted functionOne()"));
assert.ok(output.match(compiledFunctionOneRe),
"Couldn't find compiled functionOne()");
makeAssertMessage("Couldn't find compiled functionOne()"));
assert.ok(output.match(interpretedFunctionTwoRe),
"Couldn't find interpreted functionTwo()");
makeAssertMessage("Couldn't find interpreted functionTwo()"));
assert.ok(output.match(compiledFunctionTwoRe),
"Couldn't find compiled functionTwo");
makeAssertMessage("Couldn't find compiled functionTwo"));

0 comments on commit 1816d46

Please sign in to comment.