RFR: 8292679: Simplify thread creation in gtest and port 2 tests to new way [v2]

Johan Sjölén duke at openjdk.org
Wed Aug 24 10:56:40 UTC 2022


> This PR removes a lot of boilerplate that was required when creating multi-threaded tests and ports 2 tests to show that the number of lines of code is significantly reduced and that porting is fairly trivial. The ported tests also serve as an introduction to others who're looking into writing their own multi-threaded tests.
> 
> Testing: Ran the ported tests on my machine, also running the tests on x64 {Windows, Linux, Mac OS X],  aarch64 { Linux, Mac OS X} and tier1 for "completeness".

Johan Sjölén has updated the pull request incrementally with four additional commits since the last revision:

 - Add some more comments
 - Fix S to int for BasicTestThread too
 - Remove S from TestThreadGroup and fix it to int for thread id
 - Make N a constructor argument instead of a template one

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/9962/files
  - new: https://git.openjdk.org/jdk/pull/9962/files/bf1b5524..f36bdb0e

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=9962&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9962&range=00-01

  Stats: 33 lines in 3 files changed: 6 ins; 5 del; 22 mod
  Patch: https://git.openjdk.org/jdk/pull/9962.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/9962/head:pull/9962

PR: https://git.openjdk.org/jdk/pull/9962


More information about the hotspot-dev mailing list