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

8246494: introduce vm.flagless at-requires property #2800

wants to merge 2 commits into from


Copy link

@iignatev iignatev commented Mar 2, 2021

resurrecting old RFR:

Hi all,

could you please review the patch which introduces a new @requires property to filter out the tests which ignore externally provided JVM flags?

the idea behind this patch is to have a way to clearly mark tests which ignore flags, so
a) it's obvious that they don't execute a flag-guarded code/feature, and extra care should be taken to use them to verify any flag-guarded changed;
b) they can be easily excluded from runs w/ flags.

@requires and VMProps allows us to achieve both, so it's been decided to add a new property vm.flagless. vm.flagless is set to false if there are any XX flags other than -XX:MaxRAMPercentage and -XX:CreateCoredumpOnCrash (which are known to be set almost always) or any X flags other -Xmixed; in other words any tests w/ @requires vm.flagless will be excluded from runs w/ any other X / XX flags passed via -vmoption / -javaoption. in rare cases, when one still wants to run the tests marked by vm.flagless w/ external flags, vm.flagless can be forcefully set to true by setting any value to TEST_VM_FLAGLESS env. variable.

this patch adds necessary common changes and marks common tests, namely Scimark, GTestWrapper and TestNativeProcessBuilder. Component-specific tests will be marked separately by the corresponding subtasks of 8151707[1].

please note, the patch depends on CODETOOLS-7902336[2], which will be included in the next jtreg version, so this patch is to be integrated only after jtreg5.1 is promoted and we switch to use it by 8246387[3].

testing: marked tests w/ different XX and X flags w/ and w/o TEST_VM_FLAGLESS env. var, and w/o any flags


after offline discussion with @pliden, it has been decided to reduce the scope of 8246499 and not mark the tests that use UseXGC flags for selection, e.g. test/hotspot/jtreg/gc/z/

-- Igor


  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed


  • JDK-8246494: introduce vm.flagless at-requires property



$ git fetch pull/2800/head:pull/2800
$ git checkout pull/2800

Copy link

@bridgekeeper bridgekeeper bot commented Mar 2, 2021

👋 Welcome back iignatyev! 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 changed the title 8246494 8246494: introduce vm.flagless at-requires property Mar 2, 2021
Copy link

@openjdk openjdk bot commented Mar 2, 2021

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

  • hotspot

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 label Mar 2, 2021
@iignatev iignatev marked this pull request as ready for review Mar 9, 2021
@openjdk openjdk bot added the rfr label Mar 9, 2021
Copy link

@mlbridge mlbridge bot commented Mar 9, 2021


Copy link
Member Author

@iignatev iignatev commented Mar 12, 2021


/label hotspot-compiler hotspot-gc hotspot-runtime serviceability

@openjdk openjdk bot added hotspot-compiler hotspot-gc hotspot-runtime serviceability labels Mar 12, 2021
Copy link

@openjdk openjdk bot commented Mar 12, 2021

The hotspot-compiler label was successfully added.

The hotspot-gc label was successfully added.

The hotspot-runtime label was successfully added.

The serviceability label was successfully added.

Copy link

@mseledts mseledts left a comment

These changes look good to me.

Copy link
Member Author

@iignatev iignatev commented Mar 17, 2021

Thanks, Misha!

-- Igor

Copy link

@sspitsyn sspitsyn left a comment

The fix looks good to me.

Copy link

@openjdk openjdk bot commented Mar 17, 2021

@iignatev This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file for details.

After integration, the commit message for the final commit will be:

8246494: introduce vm.flagless at-requires property

Reviewed-by: mseledtsov, sspitsyn

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

  • d2144a5: 8263058: Optimize vector shift with zero shift count
  • dd6c911: 8263705: Two shenandoah tests fail due to can't find ClassFileInstaller
  • 4acb883: 8261666: [mlvm] Remove WhiteBoxHelper
  • 5069796: 8263164: assert(_base >= VectorA && _base <= VectorZ) failed: Not a Vector while calling StoreVectorNode::memory_size()
  • 996079b: 8260650: test failed with "assert(false) failed: infinite loop in PhaseIterGVN::optimize"
  • 9cb9af6: 8260959: remove RECORDS from PreviewFeature.Feature enum
  • 05fe06a: 8255790: GTKL&F: Java 16 crashes on initialising GTKL&F on Manjaro Linux
  • 422eba8: 8263536: Add @build tags to jpackage tests
  • 0d2f87e: 8263562: Checking if proxy_klass_head is still lambda_proxy_is_available
  • a67a679: 8263679: C1: Remove vtable call
  • ... and 99 more:

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 master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready label Mar 17, 2021
Copy link
Member Author

@iignatev iignatev commented Mar 18, 2021

Thanks, Serguei!


@openjdk openjdk bot closed this Mar 18, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Mar 18, 2021
Copy link

@openjdk openjdk bot commented Mar 18, 2021

@iignatev Since your change was applied there have been 142 commits pushed to the master branch:

  • 8c8d1b3: 8263495: Gather liveness info in the mark phase of G1 full gc
  • a85dc55: 8263311: Watch registry changes for remote printers update instead of polling
  • 3f31a6b: 8263775: C2: igv_print() crash unexpectedly when called from debugger
  • 63eae8f: 8260605: Various java.lang.invoke cleanups
  • 9cd21b6: 8263590: Rawtypes warnings should be produced for pattern matching in instanceof
  • ff52f29: 8260716: Assert in MacroAssembler::clear_mem with -XX:-IdealizeClearArrayNode
  • 72b82fd: 8263725: JFR oldobject tests are not run when GCs are specified explicitly
  • 444a80b: 8263455: NMT: assert on registering a region which completely engulfs an existing region
  • 2b93ae0: 8261480: MetaspaceShared::preload_and_dump should check exceptions
  • 81ba578: 8263676: AArch64: one potential bug in C1 LIRGenerator::generate_address()
  • ... and 132 more:

Your commit was automatically rebased without conflicts.

Pushed as commit e333b6e.

💡 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
hotspot hotspot-compiler hotspot-gc hotspot-runtime integrated serviceability
3 participants