--- a/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp Wed May 29 09:25:20 2019 +0200
+++ b/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp Wed May 29 12:01:21 2019 +0200
@@ -34,7 +34,6 @@
#include "gc/shenandoah/shenandoahAllocTracker.hpp"
#include "gc/shenandoah/shenandoahBarrierSet.hpp"
-#include "gc/shenandoah/shenandoahForwarding.hpp"
#include "gc/shenandoah/shenandoahClosures.inline.hpp"
#include "gc/shenandoah/shenandoahCollectionSet.hpp"
#include "gc/shenandoah/shenandoahCollectorPolicy.hpp"
@@ -139,8 +138,6 @@
};
jint ShenandoahHeap::initialize() {
- ShenandoahForwarding::initial_checks();
-
initialize_heuristics();
//
@@ -876,49 +873,6 @@
return _free_set->allocate(req, in_new_region);
}
-class ShenandoahMemAllocator : public MemAllocator {
-private:
- MemAllocator& _initializer;
-public:
- ShenandoahMemAllocator(MemAllocator& initializer, Klass* klass, size_t word_size, Thread* thread) :
- MemAllocator(klass, word_size + ShenandoahForwarding::word_size(), thread),
- _initializer(initializer) {}
-
-protected:
- virtual HeapWord* mem_allocate(Allocation& allocation) const {
- HeapWord* result = MemAllocator::mem_allocate(allocation);
- // Initialize brooks-pointer
- if (result != NULL) {
- result += ShenandoahForwarding::word_size();
- ShenandoahForwarding::initialize(oop(result));
- assert(! ShenandoahHeap::heap()->in_collection_set(result), "never allocate in targetted region");
- }
- return result;
- }
-
- virtual oop initialize(HeapWord* mem) const {
- return _initializer.initialize(mem);
- }
-};
-
-oop ShenandoahHeap::obj_allocate(Klass* klass, int size, TRAPS) {
- ObjAllocator initializer(klass, size, THREAD);
- ShenandoahMemAllocator allocator(initializer, klass, size, THREAD);
- return allocator.allocate();
-}
-
-oop ShenandoahHeap::array_allocate(Klass* klass, int size, int length, bool do_zero, TRAPS) {
- ObjArrayAllocator initializer(klass, size, length, do_zero, THREAD);
- ShenandoahMemAllocator allocator(initializer, klass, size, THREAD);
- return allocator.allocate();
-}
-
-oop ShenandoahHeap::class_allocate(Klass* klass, int size, TRAPS) {
- ClassAllocator initializer(klass, size, THREAD);
- ShenandoahMemAllocator allocator(initializer, klass, size, THREAD);
- return allocator.allocate();
-}
-
HeapWord* ShenandoahHeap::mem_allocate(size_t size,
bool* gc_overhead_limit_was_exceeded) {
ShenandoahAllocRequest req = ShenandoahAllocRequest::for_shared(size);
@@ -961,15 +915,6 @@
return NULL;
}
-void ShenandoahHeap::fill_with_dummy_object(HeapWord* start, HeapWord* end, bool zap) {
- HeapWord* obj = tlab_post_allocation_setup(start);
- CollectedHeap::fill_with_object(obj, end);
-}
-
-size_t ShenandoahHeap::min_dummy_object_size() const {
- return CollectedHeap::min_dummy_object_size() + ShenandoahForwarding::word_size();
-}
-
class ShenandoahConcurrentEvacuateRegionObjectClosure : public ObjectClosure {
private:
ShenandoahHeap* const _heap;
@@ -980,7 +925,7 @@
void do_object(oop p) {
shenandoah_assert_marked(NULL, p);
- if (oopDesc::equals_raw(p, ShenandoahBarrierSet::resolve_forwarded_not_null(p))) {
+ if (!p->is_forwarded()) {
_heap->evacuate_object(p, _thread);
}
}
@@ -1060,8 +1005,8 @@
void ShenandoahHeap::trash_humongous_region_at(ShenandoahHeapRegion* start) {
assert(start->is_humongous_start(), "reclaim regions starting with the first one");
- oop humongous_obj = oop(start->bottom() + ShenandoahForwarding::word_size());
- size_t size = humongous_obj->size() + ShenandoahForwarding::word_size();
+ oop humongous_obj = oop(start->bottom());
+ size_t size = humongous_obj->size();
size_t required_regions = ShenandoahHeapRegion::required_regions(size * HeapWordSize);
size_t index = start->region_number() + required_regions - 1;
@@ -1874,13 +1819,6 @@
set_gc_state_mask(EVACUATION, in_progress);
}
-HeapWord* ShenandoahHeap::tlab_post_allocation_setup(HeapWord* obj) {
- // Initialize Brooks pointer for the next object
- HeapWord* result = obj + ShenandoahForwarding::word_size();
- ShenandoahForwarding::initialize(oop(result));
- return result;
-}
-
void ShenandoahHeap::ref_processing_init() {
assert(_max_workers > 0, "Sanity");
@@ -2853,11 +2791,3 @@
}
}
}
-
-size_t ShenandoahHeap::obj_size(oop obj) const {
- return CollectedHeap::obj_size(obj) + ShenandoahForwarding::word_size();
-}
-
-ptrdiff_t ShenandoahHeap::cell_header_size() const {
- return ShenandoahForwarding::byte_size();
-}