-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
8338428: Add logging of final VM flags while setting properties #23054
Conversation
👋 Welcome back lmesnik! A progress list of the required criteria for merging this PR into |
@lmesnik This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 146 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
Webrevs
|
Does this mean that the execution of every single test must now first exec a new VM and use it to dump the flags? And where does this output go? |
Yes, you are correct. If it looks like a problem, it could be added by requires with java property. So it could be off by default and switched on only when needed.
|
Given we run many thousands of tests each day, the machine time needed to execute yet-another-vm for each test, would make this too costly. Can we not piggy-back this into the VM that does the "requires" processing? |
Ough, I misread your question. I though that you are asking if it is executed even the only one single test is run. The more significant increase might be for users that run a single or very few tests with '-Xcomp" where any VM start have a significant ovehead similar to simple test execution. However, all the things are slow with the '-Xcomp'. |
@lmesnik Unknown command |
So it is once per run of jtreg effectively? Even so while the cost to the test task is negligible the accumulated cost in machine time (which someone is paying for) is not. Everything else in |
This trick should work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can flags supplied by a test, or the user, interfere with that invocation?
Do you really want the xml format for this file?
This invocation uses flags set to jtreg like -javaoption, -vmoption but not test-specific flags. I think it is ok to have it in xml so far. The more problem is how people aware about this information. Probably add it to https://bugs.openjdk.org/browse/JDK-8346464 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay this approach seems reasonable and doesn't add a huge burden to running the tests.
Do we want to add this to all TEST.ROOT files or will hotspot and jdk suffice here?
The PR description should be updated and we probably need to expand this to other groups for review.
/cc corelibs |
@lmesnik
|
/cc core-libs |
@lmesnik |
/reviewers 2 reviewer This has a very broad impact on all tests and should have a second reviewer. |
@RogerRiggs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like overkill for a weak use case.
The resulting log file is in the scratch directory so it will not be retained for long.
In local builds, whoever is running the test could add the arguments.
Have there been any negative interactions with any of the test tiers due to the addition of extra logging flags?
Thanks for your feedback. Currently, typical size of artifacts for passed run take a tens of MB, so it is less then 0.5% increase. The main consumer are .jtr files.
Which negative interactions you suppose? This fix shouldn't interfere with executed tests completely. |
I don't see when these new flags come into use. I built the PR and ran tests through make and did not see the flags (PrintFinalFlags) used when running the tests in the resulting jtr files. (I ran a subset of both jdk and hotspot/jtreg tests.) |
This flag is not used while tests are executed. It is used only when jtreg run VMProps, executed before all tests are run and you can find result in scratch directory. |
Nit: the JBS title should be "Add logging of final VM flags ..." not 'if' |
Got it, I've resolved my mis-understanding of the properties being changed to the narrow use of invoking the initial VMProps to determine the supported properties of the VM under test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
/integrate |
@lmesnik This pull request has not yet been marked as ready for integration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still good.
/integrate |
Going to push as commit bbd8807.
Your commit was automatically rebased without conflicts. |
Some VM flags might depend on the environment and it makes sense to log final flags so it is possible to get their value when investigating failures.
I added them to VMProps, so it is always dump final flags before running tests using "-XX:+PrintFlagsFinal".
Update:
There were intermittent compilation failures when I tried to use classes from testlibrary, so I rewrtite the code without them.
Progress
Issue
Backport <hash>
with the hash of the original commit. See Backports.Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/23054/head:pull/23054
$ git checkout pull/23054
Update a local copy of the PR:
$ git checkout pull/23054
$ git pull https://git.openjdk.org/jdk.git pull/23054/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 23054
View PR using the GUI difftool:
$ git pr show -t 23054
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/23054.diff
Using Webrev
Link to Webrev Comment