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

8314837: 5 compiled/codecache tests ignore VM flags #15485

Closed
wants to merge 4 commits into from

Conversation

yftsai
Copy link
Contributor

@yftsai yftsai commented Aug 30, 2023

3 codecache/cli tests are marked with @requires vm.flagless as they ignore VM flags. These tests enumerate combinations of flags, and some (e.g. -Xint) are incompatible with flags of compiler modes.

External VM flags are passed to the created processes in CodeCacheFullCountTest and CheckCodeCacheInfo. The former creates the process with code cache flushing disabled, and is compatible with flags except the interpreter mode. The later creates a process to print verbose code cache info, and the feature is independent of other flags.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8314837: 5 compiled/codecache tests ignore VM flags (Sub-task - P5)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/15485/head:pull/15485
$ git checkout pull/15485

Update a local copy of the PR:
$ git checkout pull/15485
$ git pull https://git.openjdk.org/jdk.git pull/15485/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 15485

View PR using the GUI difftool:
$ git pr show -t 15485

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/15485.diff

Webrev

Link to Webrev Comment

TestSegmentedCodeCacheOption, TestCodeHeapSizeOptions, and
TestPrintCodeCacheOption create processes with various flags.
These flags include interpreter, tiered compilation, or segmented code
cache, and they may conflict with the additionally specified vm flags.
If propagating the flags and overwriting their values, the tests may
not run in the intended way. This change adds `@requires vm.flagless`
to these tests and keeps them creating processes while ignoring flags.

CodeCacheFullCountTest creates a process with specific flags:
ReservedCodeCacheSize, UseCodeCacheFlushing, and MethodFlushing. This
change requires `vm.flagless` for the same reason.

CheckCodeCacheInfo creates a process to print the code cache info while
enabling Verbose. Both PrintCodeCache and Verbose are unlikely to
conflict with additionally specified vm flags in a significant way, and
the info printed stays the same. This change propagates the vm flags.

CheckCodeCacheInfo passes in fastdebug build.
```
make test TEST="test/hotspot/jtreg/compiler/codecache/CheckCodeCacheInfo.java" JTREG="JAVA_OPTIONS=-XX:-TieredCompilation"
make test TEST="test/hotspot/jtreg/compiler/codecache/CheckCodeCacheInfo.java" JTREG="JAVA_OPTIONS=-Xint"
make test TEST="test/hotspot/jtreg/compiler/codecache/CheckCodeCacheInfo.java" JTREG="JAVA_OPTIONS=-XX:-PrintCodeCache"
```
@bridgekeeper
Copy link

bridgekeeper bot commented Aug 30, 2023

👋 Welcome back yftsai! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Aug 30, 2023
@openjdk
Copy link

openjdk bot commented Aug 30, 2023

@yftsai The following label will be automatically applied to this pull request:

  • hotspot-compiler

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the hotspot-compiler hotspot-compiler-dev@openjdk.org label Aug 30, 2023
@mlbridge
Copy link

mlbridge bot commented Aug 30, 2023

Webrevs

@vnkozlov
Copy link
Contributor

I think your description is not accurate. I sounds like this change will prevent passing external test flags into tests.
But synopsis of this RFE correctly says tests ignore VM flags. And main RFE 8314823 has even more explicit synopsis Update or mark as vm.flagless tests which ignores external VM flags.

So adding @requires vm.flagless simply marks tests which ignore external flags and don't run them in configurations with external flags specified.

I suggest to add comment to CheckCodeCacheInfo.java before ProcessTools.createTestJvm() call to say that:

ProcessTools.createTestJvm - creates a ProcessBuilder to run java with all the test framework arguments applied. 

this text is from David H. comment in 8314823.

@yftsai
Copy link
Contributor Author

yftsai commented Aug 30, 2023

I marked CheckCodeCacheInfo with vm.flagless. The tested feature doesn't depend on other flags. The irrelevant flag UnlockDiagnosticVMOptions is also removed.

@vnkozlov
Copy link
Contributor

I marked CheckCodeCacheInfo with vm.flagless. The tested feature doesn't depend on other flags. The irrelevant flag UnlockDiagnosticVMOptions is also removed.

Okay, this will do.

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

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

Good. You need second review.

@openjdk
Copy link

openjdk bot commented Aug 31, 2023

@yftsai 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:

8314837: 5 compiled/codecache tests ignore VM flags

Reviewed-by: kvn, lmesnik

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 41 new commits pushed to the master branch:

  • 764f65c: 8315278: Patch 'print-targets' target to print targets separated by new line
  • 7754ac0: 8314925: ChoiceFormat does not specify IllegalArgumentExceptions
  • 2264667: 8315422: getSoTimeout() would be in try block in SSLSocketImpl
  • d5973bd: 6333341: [BI] Doc: java.text.BreakIterator class specification is unclear
  • 63f561f: 8306882: (fs) Path.toRealPath(LinkOption.NOFOLLOW_LINKS) fails when "../../" follows a link
  • 2436fb0: 8312306: Add more Reference.reachabilityFence() calls to the security classes using Cleaner
  • 351c31e: 8315378: [BACKOUT] runtime/NMT/SummarySanityCheck.java failed with "Total committed (MMMMMM) did not match the summarized committed (NNNNNN)"
  • c12ca88: 8312521: Unused field LocaleProviderAdapter#defaultLocaleProviderAdapter could be removed
  • b38bcae: 8313656: assert(!JvmtiExport::can_support_virtual_threads()) with -XX:-DoJVMTIVirtualThreadTransitions
  • c8acab1: 8315413: Remove special filtering of Continuation.yield0 in StackWalker
  • ... and 31 more: https://git.openjdk.org/jdk/compare/e22762c010e5cd4c313e5f2816b67d75862935a7...master

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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@vnkozlov, @lmesnik) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Aug 31, 2023
@vnkozlov
Copy link
Contributor

@lmesnik, please look.

@lmesnik
Copy link
Member

lmesnik commented Aug 31, 2023

@yftsai The preferred fix is to use 'ProcessTools.createTestJvm ' to fork JVM with tested flags for most of tests
It helps to ensure that corresponding functionality works for different modes like C2/C1 only, JMCI compiler and other modes. I think it would be better just to use it for
test/hotspot/jtreg/compiler/codecache/CheckCodeCacheInfo.java
test/hotspot/jtreg/compiler/codecache/CodeCacheFullCountTest.java.

The vm.flagless is usually used for tests which are incompatible with any or most of external flags. It is fine to use it for cli tests.

@yftsai
Copy link
Contributor Author

yftsai commented Sep 1, 2023

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Sep 1, 2023
@openjdk
Copy link

openjdk bot commented Sep 1, 2023

@yftsai
Your change (at version f7b81b2) is now ready to be sponsored by a Committer.

@lmesnik
Copy link
Member

lmesnik commented Sep 1, 2023

/sponsor

@openjdk
Copy link

openjdk bot commented Sep 1, 2023

Going to push as commit 2a11bc4.
Since your change was applied there have been 52 commits pushed to the master branch:

  • 2f7c65e: 8303427: Fixpath confused if unix root contains "/jdk"
  • e9e0c56: 8314319: LogCompilation doesn't reset lateInlining when it encounters a failure.
  • 56b8db1: 8258970: Disabled JPasswordField foreground color is wrong with GTK LAF
  • 0d4cadb: 8315195: RISC-V: Update hwprobe query for new extensions
  • b4f7069: 8315446: G1: Remove unused G1AllocRegion::attempt_allocation
  • cf02cf3: 8315098: Improve URLEncodeDecode microbenchmark
  • c32e340: 8315321: [aix] os::attempt_reserve_memory_at must map at the requested address or fail
  • 42f5b9e: 8315436: HttpsServer does not send TLS alerts
  • 033f311: 8315069: Relativize extended_sp in interpreter frames
  • c2e01eb: 8313983: jmod create --target-platform should replace existing ModuleTarget attribute
  • ... and 42 more: https://git.openjdk.org/jdk/compare/e22762c010e5cd4c313e5f2816b67d75862935a7...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Sep 1, 2023
@openjdk openjdk bot closed this Sep 1, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Sep 1, 2023
@openjdk
Copy link

openjdk bot commented Sep 1, 2023

@lmesnik @yftsai Pushed as commit 2a11bc4.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-compiler hotspot-compiler-dev@openjdk.org integrated Pull request has been integrated
3 participants