8248227: Shenandoah: Refactor Shenandoah::heap() to match other GCs
Reviewed-by: shade
This commit is contained in:
parent
c07ce7eec7
commit
fe145646e7
src/hotspot/share/gc/shenandoah
@ -83,8 +83,6 @@
|
||||
#include "services/mallocTracker.hpp"
|
||||
#include "utilities/powerOfTwo.hpp"
|
||||
|
||||
ShenandoahHeap* ShenandoahHeap::_heap = NULL;
|
||||
|
||||
#ifdef ASSERT
|
||||
template <class T>
|
||||
void ShenandoahAssertToSpaceClosure::do_oop_work(T* p) {
|
||||
@ -497,8 +495,6 @@ ShenandoahHeap::ShenandoahHeap(ShenandoahCollectorPolicy* policy) :
|
||||
_liveness_cache(NULL),
|
||||
_collection_set(NULL)
|
||||
{
|
||||
_heap = this;
|
||||
|
||||
BarrierSet::set_barrier_set(new ShenandoahBarrierSet(this));
|
||||
|
||||
_max_workers = MAX2(_max_workers, 1U);
|
||||
|
@ -141,9 +141,6 @@ public:
|
||||
|
||||
// ---------- Initialization, termination, identification, printing routines
|
||||
//
|
||||
private:
|
||||
static ShenandoahHeap* _heap;
|
||||
|
||||
public:
|
||||
static ShenandoahHeap* heap();
|
||||
|
||||
|
@ -49,8 +49,7 @@
|
||||
#include "utilities/globalDefinitions.hpp"
|
||||
|
||||
inline ShenandoahHeap* ShenandoahHeap::heap() {
|
||||
assert(_heap != NULL, "Heap is not initialized yet");
|
||||
return _heap;
|
||||
return named_heap<ShenandoahHeap>(CollectedHeap::Shenandoah);
|
||||
}
|
||||
|
||||
inline ShenandoahHeapRegion* ShenandoahRegionIterator::next() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user