Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test: adapt test-linux-perf to V8 changes
Refs: v8/v8@9a31804

PR-URL: #38273
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 11, 2021
commit c50953226afc1d102a3ed14a63c92b2d5e78dc87
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"));