Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8351345: Test: Print out non-whitelisted JTreg VM or Javaoptions flag #23931

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,7 @@ private boolean onlyWhitelistedJTregVMAndJavaOptsFlags() {
// Property flags (prefix -D), -ea and -esa are whitelisted.
if (!flag.startsWith("-D") && !flag.startsWith("-e") && JTREG_WHITELIST_FLAGS.stream().noneMatch(flag::contains)) {
// Found VM flag that is not whitelisted
System.out.println("Non-whitelisted JTreg VM or Javaoptions flag: " + flag);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good idea! Is the intention to just report the first non-whitelisted flag found or all of them? I guess just one of them is fine to indicate the reason for not performing IR matching (could be verbose to report all non-whitelisted flags otherwise).

I would merge this message with the already existing one here and remove that one in favor of the new one:

if (!irVerificationPossible) {
System.out.println("IR verification disabled due to using non-whitelisted JTreg VM or Javaoptions flag(s)."
+ System.lineSeparator());
}

Another thought while cleaning this up: We could also improve this message

irVerificationPossible = Platform.isDebugBuild() && !Platform.isInt() && !Platform.isComp();
if (!irVerificationPossible) {
System.out.println("IR verification disabled due to not running a debug build (required for PrintIdeal" +
"and PrintOptoAssembly), running with -Xint, or -Xcomp (use warm-up of 0 instead)");
return;
}

and split it into three separate bailouts + messages. Could be part of this RFE (you could then set a new title for the issue to something like [IR Framework] Improve reported disabled IR verification messages).

return false;
}
}
Expand Down