RFR: 8340103: Add internal set_flag function to VMATree [v17]

Johan Sjölen jsjolen at openjdk.org
Wed Nov 6 10:28:04 UTC 2024


> Hi!
> 
> The old VirtualMemoryTracker has a method set_reserved_region_type(address, flag). We implement this for the new VMATree implementation by altering the signature slightly to set_reserved_region_type(address, size, flag). This simplifies the implementation greatly for our new data structure and leads to trivial changes for the callers (all callers already know the size).
> 
> This PR implements the internal implementation along with tests, but does not change any callers.
> 
> I also do a few cleanups:
> 
> - Change `Node` to `TreeNode` in tests, we've seen build failures because of this (probably a precompiled headers issue)
> - Add a few `print_on` methods for  easy debugging
> - Add a `size` alias, it was a bit confusing that some functions took an argument `position sz`, so changed that to `size sz` 
> 
> Thanks.

Johan Sjölen has updated the pull request incrementally with two additional commits since the last revision:

 - Use size type and size argument name uniformly
 - Avoid style discussion by adopting an already accepted style :D

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/20994/files
  - new: https://git.openjdk.org/jdk/pull/20994/files/5ab0d4e9..978b3d7b

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=20994&range=16
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=20994&range=15-16

  Stats: 11 lines in 2 files changed: 2 ins; 0 del; 9 mod
  Patch: https://git.openjdk.org/jdk/pull/20994.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/20994/head:pull/20994

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


More information about the hotspot-runtime-dev mailing list