RFR: 8291945: Add OSInfo API for static OS information [v2]

Ioi Lam iklam at openjdk.org
Mon Aug 8 21:50:17 UTC 2022


> As suggested by @tstuefe in the review of #9600, many of the `os` APIs simply return a value that was initialized during VM start up. E.g., `os::vm_page_size()`. I have added a new class `OSInfo` for managing such info
> 
> - Simplifies the per-OS implementation
> - Make the "init-only-once" check consistent
> - In some cases, the simpler `OSInfo` class can be used in lieu of the more complex `os` class. This improves HotSpot build time (e.g., relocInfo.hpp).
> 
> Note: I moved only 2 fields in this PR as a first step. If this works well I plan to move more fields in the future.

Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:

  fixed typo

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/9758/files
  - new: https://git.openjdk.org/jdk/pull/9758/files/9e918e8e..3da77fcb

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

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/9758.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/9758/head:pull/9758

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


More information about the hotspot-dev mailing list