Skip to content

Commit 96ee2d5

Browse files
committed
Fix host inlining test to account for 'too many fast-path invokes'
* It can be reported instead of 'Out of budget'.
1 parent 2e4b00a commit 96ee2d5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/truffle/compiler/host-inlining.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ source test/truffle/common.sh.inc
44

55
file=${1:-host-inlining.txt}
66

7+
too_big='Out of budget|too big to explore|too many fast-path invokes'
8+
79
if [ -n "$TRUFFLERUBY_HOST_INLINING_TEST" ]; then
8-
# shellcheck disable=SC2016
910
ruby tool/extract_host_inlining.rb 'org.truffleruby.language.methods.CallForeignMethodNodeGen.execute' "$file" > out.txt
10-
# shellcheck disable=SC2016
1111
grep -F 'Root[org.truffleruby.language.methods.CallForeignMethodNodeGen.execute]' out.txt
12-
if ! grep -E 'Out of budget|too big to explore' out.txt; then
13-
echo 'CallForeignMethodNodeGen.execute should be out of budget (too much code), did host inlining output change?'
12+
if ! grep -E "$too_big" out.txt; then
13+
echo "CallForeignMethodNodeGen.execute should be /$too_big/, did host inlining output change?"
1414
cat out.txt
1515
exit 1
1616
fi
1717

1818
ruby tool/extract_host_inlining.rb org.truffleruby.language.dispatch.RubyCallNode.execute "$file" > out.txt
1919
grep -F 'Root[org.truffleruby.language.dispatch.RubyCallNode.execute]' out.txt
20-
if grep -E 'Out of budget|too big to explore' out.txt; then
20+
if grep -E "$too_big" out.txt; then
2121
echo 'RubyCallNode.execute no longer fits in host inlining budget'
2222
cat out.txt
2323
exit 1

0 commit comments

Comments
 (0)