RFR: 8290739: Simplify storage of dump-time class information [v4]

Ioi Lam iklam at openjdk.org
Wed Jul 27 20:23:54 UTC 2022


> Some code clean up in anticipation of future CDS development.
> 
> I moved the initialization of `SystemDictionaryShared::_dumptime_table` and `SystemDictionaryShared::_dumptime_lambda_proxy_class_dictionary` to VM bootstrap, so that:
> - We don't need to allocate these tables dynamically
> - We don't need to check if these tables exist when writing the archive
> 
> The current implementation guarantees that `SystemDictionaryShared::_dumptime_table` always contains a `DumpTimeClassInfo` for each `InstanceKlass` that's being considered for inclusion in the CDS archive. I simplified the old `SystemDictionaryShared::find_or_allocate_info_for()` API to
> 
> 
> // Guaranteed to return non-NULL value for non-shared classes.
> // k must not be a shared class.
> DumpTimeClassInfo* SystemDictionaryShared::get_info(InstanceKlass* k)
> 
> 
> For more details, please see JBS issue: [JDK-8290739](https://bugs.openjdk.org/browse/JDK-8290739)

Ioi Lam has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains seven additional commits since the last revision:

 - Merge branch 'master' of https://github.com/openjdk/jdk into 8290739-refactor-sysdictshared-find-or-allocate-info
 - fixed whitespaces
 - added asserts for get_info(); renamed _no_class_loading_should_happen -> !_class_loading_may_happen to avoid double-negation in the code
 - added comments; fixed minimal build
 - small fix
 - simplification: do not initialize _dumptime_lambda_proxy_class_dictionary on demand
 - 8290739: Refactor SystemDictionaryShared::find_or_allocate_info_for()

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/9634/files
  - new: https://git.openjdk.org/jdk/pull/9634/files/0c264169..6a3182a9

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=9634&range=03
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=9634&range=02-03

  Stats: 3625 lines in 164 files changed: 2105 ins; 1190 del; 330 mod
  Patch: https://git.openjdk.org/jdk/pull/9634.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/9634/head:pull/9634

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


More information about the hotspot-runtime-dev mailing list