286 // this method will be found dead by the marking cycle).
287 void allocate_dummy_regions() PRODUCT_RETURN;
288
289 // Clear RSets after a compaction. It also resets the GC time stamps.
290 void clear_rsets_post_compaction();
291
292 // If the HR printer is active, dump the state of the regions in the
293 // heap after a compaction.
294 void print_hrm_post_compaction();
295
296 // Create a memory mapper for auxiliary data structures of the given size and
297 // translation factor.
298 static G1RegionToSpaceMapper* create_aux_memory_mapper(const char* description,
299 size_t size,
300 size_t translation_factor);
301
302 static G1Policy* create_g1_policy();
303
304 void trace_heap(GCWhen::Type when, const GCTracer* tracer);
305
306 void process_weak_jni_handles();
307
308 // These are macros so that, if the assert fires, we get the correct
309 // line number, file, etc.
310
311 #define heap_locking_asserts_params(_extra_message_) \
312 "%s : Heap_lock locked: %s, at safepoint: %s, is VM thread: %s", \
313 (_extra_message_), \
314 BOOL_TO_STR(Heap_lock->owned_by_self()), \
315 BOOL_TO_STR(SafepointSynchronize::is_at_safepoint()), \
316 BOOL_TO_STR(Thread::current()->is_VM_thread())
317
318 #define assert_heap_locked() \
319 do { \
320 assert(Heap_lock->owned_by_self(), \
321 heap_locking_asserts_params("should be holding the Heap_lock")); \
322 } while (0)
323
324 #define assert_heap_locked_or_at_safepoint(_should_be_vm_thread_) \
325 do { \
|
286 // this method will be found dead by the marking cycle).
287 void allocate_dummy_regions() PRODUCT_RETURN;
288
289 // Clear RSets after a compaction. It also resets the GC time stamps.
290 void clear_rsets_post_compaction();
291
292 // If the HR printer is active, dump the state of the regions in the
293 // heap after a compaction.
294 void print_hrm_post_compaction();
295
296 // Create a memory mapper for auxiliary data structures of the given size and
297 // translation factor.
298 static G1RegionToSpaceMapper* create_aux_memory_mapper(const char* description,
299 size_t size,
300 size_t translation_factor);
301
302 static G1Policy* create_g1_policy();
303
304 void trace_heap(GCWhen::Type when, const GCTracer* tracer);
305
306 void process_heap_monitoring();
307 void process_weak_jni_handles();
308
309 // These are macros so that, if the assert fires, we get the correct
310 // line number, file, etc.
311
312 #define heap_locking_asserts_params(_extra_message_) \
313 "%s : Heap_lock locked: %s, at safepoint: %s, is VM thread: %s", \
314 (_extra_message_), \
315 BOOL_TO_STR(Heap_lock->owned_by_self()), \
316 BOOL_TO_STR(SafepointSynchronize::is_at_safepoint()), \
317 BOOL_TO_STR(Thread::current()->is_VM_thread())
318
319 #define assert_heap_locked() \
320 do { \
321 assert(Heap_lock->owned_by_self(), \
322 heap_locking_asserts_params("should be holding the Heap_lock")); \
323 } while (0)
324
325 #define assert_heap_locked_or_at_safepoint(_should_be_vm_thread_) \
326 do { \
|