RFR: 8251158: Implementation of JEP 387: Elastic Metaspace

Leo Korinth leo.korinth at oracle.com
Thu Aug 20 14:36:00 UTC 2020


Hi, some more general comments.

I can see many tabs in the sources, please grep and replace them with spaces.

Naming of constants (static const for example) seems to be a mix of lower_case
or UPPER_CASE; the style guide says UPPER_CASE or UpperCamelCase (as far as I
understand). This seems to be a mix of usage in HotSpot, what is preferred?
We use UpperCamelCase in GC land.

Static fields should not start with underscore as is done in the AllStatic
Settings for example. They should not be lower_case either.

Also, some of the includes could change order, I prefer the directory metaspace
being ordered before header names starting with metaspace.

In file /src/hotspot/share/gc/shared/gcTrace.cpp:
[not sorted]:
#include "gc/shared/referenceProcessorStats.hpp" (Context)
#include "memory/metaspace.hpp" (Addition)
#include "memory/heapInspection.hpp" (Context)

In file /src/hotspot/share/gc/shared/genCollectedHeap.cpp:
[not sorted]:
#include "memory/metaspaceCounters.hpp" (Context)
#include "memory/metaspace/metaspaceSizesSnapshot.hpp" (Addition)
#include "memory/resourceArea.hpp" (Context)

In file /src/hotspot/share/jfr/recorder/checkpoint/types/jfrType.cpp:
[not sorted]:
#include "memory/metaspace.hpp" (Addition)
#include "memory/metaspace/metaspaceEnums.hpp" (Addition)
#include "jfr/utilities/jfrThreadIterator.hpp" (Context)

In file /src/hotspot/share/memory/metaspace.cpp:
[not sorted]:
#include "memory/metaspaceShared.hpp" (Addition)
#include "memory/metaspaceTracer.hpp" (Addition)
#include "memory/metaspace/chunkHeaderPool.hpp" (Addition)

In file /src/hotspot/share/memory/metaspace.cpp:
[not sorted]:
#include "memory/metaspaceTracer.hpp" (Addition)
#include "memory/metaspace/chunkHeaderPool.hpp" (Addition)
#include "memory/metaspace/chunkManager.hpp" (Context)

In file /src/hotspot/share/memory/metaspace/binlist.hpp:
[not sorted]:
#include "utilities/debug.hpp" (Addition)
#include "utilities/globalDefinitions.hpp" (Addition)
#include "memory/metaspace/counter.hpp" (Addition)

In file /src/hotspot/share/memory/metaspace/binlist.hpp:
[not sorted]:
#include "utilities/globalDefinitions.hpp" (Addition)
#include "memory/metaspace/counter.hpp" (Addition)
#include "memory/metaspace/metaspaceCommon.hpp" (Addition)

Thanks,
Leo





More information about the hotspot-gc-dev mailing list