RFR: 8315875: GenShen: Remove heap mode check from ShenandoahInitLogger

William Kemper wkemper at openjdk.org
Thu Sep 7 18:47:40 UTC 2023


On Thu, 7 Sep 2023 18:39:00 GMT, William Kemper <wkemper at openjdk.org> wrote:

> There are some additional improvements to the init logger that should be easy to upstream.

src/hotspot/share/gc/shenandoah/shenandoahInitLogger.cpp line 55:

> 53:   ShenandoahHeap* heap = ShenandoahHeap::heap();
> 54:   log_info(gc, init)("Mode: %s", heap->mode()->name());
> 55:   log_info(gc, init)("Heuristics: %s", heap->global_generation()->heuristics()->name());

Note - we still reference the `global_generation` abstraction in this file and we won't have that upstream. I wonder if we should push that abstraction back into `ShenandoahHeap` so that this code in `ShenandoahInitLogger` could call `ShenandoahHeap::heuristics` directly, with an implementation like:
```C++
ShenandoahHeuristics* ShenandoahHeap::heuristics() {
  return global_generation()->heuristics();
}

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

PR Review Comment: https://git.openjdk.org/shenandoah/pull/320#discussion_r1318992590


More information about the shenandoah-dev mailing list