< prev index next >
src/share/vm/gc/shenandoah/shenandoahHeap.cpp
Print this page
rev 13068 : [mq]: partial.patch
*** 39,48 ****
--- 39,49 ----
#include "gc/shenandoah/shenandoahHeapRegion.hpp"
#include "gc/shenandoah/shenandoahHeapRegionSet.hpp"
#include "gc/shenandoah/shenandoahHumongous.hpp"
#include "gc/shenandoah/shenandoahMarkCompact.hpp"
#include "gc/shenandoah/shenandoahMonitoringSupport.hpp"
+ #include "gc/shenandoah/shenandoahPartialGC.hpp"
#include "gc/shenandoah/shenandoahRootProcessor.hpp"
#include "gc/shenandoah/vm_operations_shenandoah.hpp"
#include "runtime/vmThread.hpp"
#include "services/mallocTracker.hpp"
*** 262,271 ****
--- 263,273 ----
_mark_bit_map1.initialize(heap_region, bitmap_region1);
_next_mark_bit_map = &_mark_bit_map1;
_connection_matrix = new ShenandoahConnectionMatrix(_max_regions);
+ _partial_gc = new ShenandoahPartialGC(this, _max_regions);
_monitoring_support = new ShenandoahMonitoringSupport(this);
_concurrent_gc_thread = new ShenandoahConcurrentThread();
*** 2525,2534 ****
--- 2527,2548 ----
ShenandoahConnectionMatrix* ShenandoahHeap::connection_matrix() {
return _connection_matrix;
}
+ ShenandoahPartialGC* ShenandoahHeap::partial_gc() {
+ return _partial_gc;
+ }
+
+ void ShenandoahHeap::do_partial_collection() {
+ {
+ ShenandoahHeapLock lock(this);
+ partial_gc()->prepare();
+ }
+ partial_gc()->do_partial_collection();
+ }
+
#ifdef ASSERT
void ShenandoahHeap::assert_heaplock_owned_by_current_thread() {
assert(_heap_lock == locked, "must be locked");
assert(_heap_lock_owner == Thread::current(), "must be owned by current thread");
}
< prev index next >