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

Johan Sjölen jsjolen at openjdk.org
Thu Oct 24 11:20:18 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 with a new target base due to a merge or a rebase. The pull request now contains 16 commits:

 - Merge branch 'master' into vma-doit
 - out_state and in_state accessors
 - apply -> add
 - flag -> tag
 - Hopefully this is it
 - OK?
 - Merge remote-tracking branch 'openjdk/master' into vma-doit
 - Fix formatting *again*
 - Fix formatting
 - Only generate if in debug mode
 - ... and 6 more: https://git.openjdk.org/jdk/compare/2c31c8ee...2aeb91f4

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

Changes: https://git.openjdk.org/jdk/pull/20994/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20994&range=08
  Stats: 189 lines in 4 files changed: 176 ins; 1 del; 12 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