< prev index next >

src/hotspot/share/gc/parallel/psCompactionManager.hpp

Print this page

        

*** 26,35 **** --- 26,36 ---- #define SHARE_GC_PARALLEL_PSCOMPACTIONMANAGER_HPP #include "gc/shared/taskqueue.hpp" #include "memory/allocation.hpp" #include "utilities/stack.hpp" + #include "psParallelCompact.hpp" class MutableSpace; class PSOldGen; class ParCompactionManager; class ObjectStartArray;
*** 75,92 **** --- 76,102 ---- static PSOldGen* _old_gen; private: OverflowTaskQueue<oop, mtGC> _marking_stack; ObjArrayTaskQueue _objarray_stack; + size_t _shadow_record; // Is there a way to reuse the _marking_stack for the // saving empty regions? For now just create a different // type of TaskQueue. RegionTaskQueue _region_stack; static ParMarkBitMap* _mark_bitmap; + // The shadow region array, we use it in a LIFO fashion, so + // that we can reuse shadow regions for better data locality + // and utilization + static GrowableArray<size_t>* _shadow_region_array; + + // This Monitor provides mutual exclusive access of _shadow_region_array + static Monitor* _shadow_region_monitor; + Action _action; HeapWord* _last_query_beg; oop _last_query_obj; size_t _last_query_ret;
*** 107,116 **** --- 117,134 ---- void stack_push(oop obj); // Do not implement an equivalent stack_pop. Deal with the // marking stack and overflow stack directly. public: + static size_t acquire_shadow_region(PSParallelCompact::RegionData* region_ptr); + static void release_shadow_region(size_t shadow_region); + static void enqueue_shadow_region(size_t shadow_region); + static void dequeue_shadow_region(); + inline size_t shadow_record() { return _shadow_record; } + inline void set_shadow_record(size_t record) { _shadow_record = record; } + inline size_t next_shadow_record(size_t workers) { _shadow_record += workers; return shadow_record(); } + void reset_bitmap_query_cache() { _last_query_beg = NULL; _last_query_obj = NULL; _last_query_ret = 0; }
< prev index next >