45 inline void ParallelScavengeHeap::invoke_scavenge() |
45 inline void ParallelScavengeHeap::invoke_scavenge() |
46 { |
46 { |
47 PSScavenge::invoke(); |
47 PSScavenge::invoke(); |
48 } |
48 } |
49 |
49 |
50 inline void ParallelScavengeHeap::invoke_full_gc(bool maximum_compaction) |
|
51 { |
|
52 if (UseParallelOldGC) { |
|
53 PSParallelCompact::invoke(maximum_compaction); |
|
54 } else { |
|
55 PSMarkSweep::invoke(maximum_compaction); |
|
56 } |
|
57 } |
|
58 |
|
59 inline bool ParallelScavengeHeap::is_in_young(oop p) { |
50 inline bool ParallelScavengeHeap::is_in_young(oop p) { |
60 // Assumes the the old gen address range is lower than that of the young gen. |
51 // Assumes the the old gen address range is lower than that of the young gen. |
61 const void* loc = (void*) p; |
52 const void* loc = (void*) p; |
62 bool result = ((HeapWord*)p) >= young_gen()->reserved().start(); |
53 bool result = ((HeapWord*)p) >= young_gen()->reserved().start(); |
63 assert(result == young_gen()->is_in_reserved(p), |
54 assert(result == young_gen()->is_in_reserved(p), |
64 err_msg("incorrect test - result=%d, p=" PTR_FORMAT, result, (void*)p)); |
55 err_msg("incorrect test - result=%d, p=" PTR_FORMAT, result, (void*)p)); |
65 return result; |
56 return result; |
66 } |
57 } |
67 |
|
68 inline bool ParallelScavengeHeap::is_in_old_or_perm(oop p) { |
|
69 return old_gen()->is_in_reserved(p) || perm_gen()->is_in_reserved(p); |
|
70 } |
|
71 |
|
72 #endif // SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PARALLELSCAVENGEHEAP_INLINE_HPP |
58 #endif // SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_PARALLELSCAVENGEHEAP_INLINE_HPP |