src/share/vm/gc_implementation/parallelScavenge/objectStartArray.hpp

changeset 25
873fd82b133d
parent 1
2d8a650513c2
child 6876
710a3c8b516e
equal deleted inserted replaced
24:d2be62fdfa50 25:873fd82b133d
18 * 18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any 20 * or visit www.oracle.com if you need additional information or have any
21 * questions. 21 * questions.
22 * 22 *
23 */
24
25 /*
26 * This file has been modified by Loongson Technology in 2015. These
27 * modifications are Copyright (c) 2015 Loongson Technology, and are made
28 * available on the same license terms set forth above.
29 */ 23 */
30 24
31 #ifndef SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_OBJECTSTARTARRAY_HPP 25 #ifndef SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_OBJECTSTARTARRAY_HPP
32 #define SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_OBJECTSTARTARRAY_HPP 26 #define SHARE_VM_GC_IMPLEMENTATION_PARALLELSCAVENGE_OBJECTSTARTARRAY_HPP
33 27
158 assert(scroll_forward <= addr, "wrong order for current and arg"); 152 assert(scroll_forward <= addr, "wrong order for current and arg");
159 assert(addr <= next, "wrong order for arg and next"); 153 assert(addr <= next, "wrong order for arg and next");
160 return scroll_forward; 154 return scroll_forward;
161 } 155 }
162 156
163 HeapWord* object_start_oldnuma(HeapWord* addr, HeapWord* bottom) const {
164 assert(_covered_region.contains(addr), "Must be in covered region");
165 jbyte* block = block_for_addr(addr);
166 HeapWord* scroll_forward;
167 if(bottom == addr)
168 return bottom;
169 else
170 scroll_forward = offset_addr_for_block(block--);
171 while (scroll_forward > addr) {
172 scroll_forward = offset_addr_for_block(block--);
173 }
174
175 HeapWord* next = scroll_forward;
176 while (next <= addr) {
177 if(oop(next)->is_oop_or_null()) {
178 scroll_forward = next;
179 next += oop(next)->size();
180 }
181 else
182 next++;
183 }
184 assert(scroll_forward <= addr, "wrong order for current and arg");
185 assert(addr <= next, "wrong order for arg and next");
186 return scroll_forward;
187 }
188
189 bool is_block_allocated(HeapWord* addr) { 157 bool is_block_allocated(HeapWord* addr) {
190 assert(_covered_region.contains(addr), "Must be in covered region"); 158 assert(_covered_region.contains(addr), "Must be in covered region");
191 jbyte* block = block_for_addr(addr); 159 jbyte* block = block_for_addr(addr);
192 if (*block == clean_block) 160 if (*block == clean_block)
193 return false; 161 return false;

mercurial