Integrated: 8282729: Serial: Move BOT implementation to collector specific directory
Axel Boldt-Christmas
aboldtch at openjdk.org
Wed Aug 24 09:54:31 UTC 2022
On Wed, 27 Jul 2022 18:04:36 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:
> Moves serial code from `share/gc/shared/blockOffsetTable.*` to `share/gc/serial/serialBlockOffsetTable.*`
> Move required fixing up some missing header files.
> Refactoring tries to respect `INCLUDE_SERIALGC` without changing any behaviour.
>
> Given that `--disable-jvm-feature-serialgc` will not build before this change, it will not build afterwards either. However it does now compile, but will fail to link.
>
> The diff below is enough to for `make hotspot` to run (on `macosx-aarch64`), but it will not build the complete JDK as the build system will use the compiled binaries with `-XX:+UseSerialGC` which obviously won't work as that GC is missing.
>
> diff --git a/src/hotspot/share/gc/shared/genCollectedHeap.cpp b/src/hotspot/share/gc/shared/genCollectedHeap.cpp
> index 5558f1a4a32..79b465b3e0a 100644
> --- a/src/hotspot/share/gc/shared/genCollectedHeap.cpp
> +++ b/src/hotspot/share/gc/shared/genCollectedHeap.cpp
> @@ -31,7 +31,6 @@
> #include "code/icBuffer.hpp"
> #include "compiler/oopMap.hpp"
> #include "gc/serial/defNewGeneration.hpp"
> -#include "gc/serial/markSweep.hpp"
> #include "gc/shared/adaptiveSizePolicy.hpp"
> #include "gc/shared/cardTableBarrierSet.hpp"
> #include "gc/shared/cardTableRS.hpp"
> @@ -80,6 +79,9 @@
> #if INCLUDE_JVMCI
> #include "jvmci/jvmci.hpp"
> #endif
> +#if INCLUDE_SERIALGC
> +#include "gc/serial/markSweep.hpp"
> +#endif
>
> GenCollectedHeap::GenCollectedHeap(Generation::Name young,
> Generation::Name old,
> @@ -204,9 +206,9 @@ void GenCollectedHeap::post_initialize() {
> initialize_size_policy(def_new_gen->eden()->capacity(),
> _old_gen->capacity(),
> def_new_gen->from()->capacity());
> -
> +#if INCLUDE_SERIALGC
> MarkSweep::initialize();
> -
> +#endif
> ScavengableNMethods::initialize(&_is_scavengable);
> }
>
> diff --git a/test/hotspot/gtest/gc/shared/test_collectorPolicy.cpp b/test/hotspot/gtest/gc/shared/test_collect
> orPolicy.cpp
> index dfe096248c7..30a24fd9232 100644
> --- a/test/hotspot/gtest/gc/shared/test_collectorPolicy.cpp
> +++ b/test/hotspot/gtest/gc/shared/test_collectorPolicy.cpp
> @@ -31,6 +31,7 @@
> #include "utilities/macros.hpp"
> #include "unittest.hpp"
>
> +#if INCLUDE_SERIALGC
> class TestGenCollectorPolicy {
> public:
>
> @@ -279,3 +280,4 @@ TEST_OTHER_VM(CollectorPolicy, old_cmd) {
>
> TestGenCollectorPolicy::TestWrapper::test(&setter_old_size, &setter_max_new_size, &checker_large);
> }
> +#endif
>
>
> There is still a lot of Serial only code in the shared code base. The `share/gc/shared/space.*` is a clear next candidate for refactoring as this change required a bunch of code in there to depend on `INCLUDE_SERIALGC` to build.
>
> Testing: Tier 1
This pull request has now been integrated.
Changeset: 0813a470
Author: Axel Boldt-Christmas <aboldtch at openjdk.org>
Committer: Albert Mingkun Yang <ayang at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/0813a4705184e33f6bd175dcd9a17d3212890daf
Stats: 998 lines in 14 files changed: 62 ins; 907 del; 29 mod
8282729: Serial: Move BOT implementation to collector specific directory
Reviewed-by: tschatzl, ayang
-------------
PR: https://git.openjdk.org/jdk/pull/9662
More information about the hotspot-gc-dev
mailing list