comparison src/share/vm/gc_implementation/parNew/parCardTableModRefBS.cpp @ 14518:d8041d695d19

Merged with jdk9/dev/hotspot changeset 3812c088b945
author twisti
date Tue, 11 Mar 2014 18:45:59 -0700
parents b9a918201d47 e5d78f318aec
children 4ca6dc0799b6
comparison
equal deleted inserted replaced
14141:f97c5ec83832 14518:d8041d695d19
1 /* 1 /*
2 * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
211 // a non-array object? 211 // a non-array object?
212 if (first_block < chunk_mr.start() // first block straddles left bdry 212 if (first_block < chunk_mr.start() // first block straddles left bdry
213 && sp->block_is_obj(first_block) // first block is an object 213 && sp->block_is_obj(first_block) // first block is an object
214 && !(oop(first_block)->is_objArray() // first block is not an array (arrays are precisely dirtied) 214 && !(oop(first_block)->is_objArray() // first block is not an array (arrays are precisely dirtied)
215 || oop(first_block)->is_typeArray())) { 215 || oop(first_block)->is_typeArray())) {
216 // Find our least non-clean card, so that a left neighbour 216 // Find our least non-clean card, so that a left neighbor
217 // does not scan an object straddling the mutual boundary 217 // does not scan an object straddling the mutual boundary
218 // too far to the right, and attempt to scan a portion of 218 // too far to the right, and attempt to scan a portion of
219 // that object twice. 219 // that object twice.
220 jbyte* first_dirty_card = NULL; 220 jbyte* first_dirty_card = NULL;
221 jbyte* last_card_of_first_obj = 221 jbyte* last_card_of_first_obj =
245 "Write exactly once : value should be stable hereafter for this round"); 245 "Write exactly once : value should be stable hereafter for this round");
246 lowest_non_clean[cur_chunk_index] = first_dirty_card; 246 lowest_non_clean[cur_chunk_index] = first_dirty_card;
247 } NOISY(else { 247 } NOISY(else {
248 tty->print_cr(" LNC: Found no dirty card in current chunk; leaving LNC entry NULL"); 248 tty->print_cr(" LNC: Found no dirty card in current chunk; leaving LNC entry NULL");
249 // In the future, we could have this thread look for a non-NULL value to copy from its 249 // In the future, we could have this thread look for a non-NULL value to copy from its
250 // right neighbour (up to the end of the first object). 250 // right neighbor (up to the end of the first object).
251 if (last_card_of_cur_chunk < last_card_of_first_obj) { 251 if (last_card_of_cur_chunk < last_card_of_first_obj) {
252 tty->print_cr(" LNC: BEWARE!!! first obj straddles past right end of chunk:\n" 252 tty->print_cr(" LNC: BEWARE!!! first obj straddles past right end of chunk:\n"
253 " might be efficient to get value from right neighbour?"); 253 " might be efficient to get value from right neighbor?");
254 } 254 }
255 }) 255 })
256 } else { 256 } else {
257 // In this case we can help our neighbour by just asking them 257 // In this case we can help our neighbor by just asking them
258 // to stop at our first card (even though it may not be dirty). 258 // to stop at our first card (even though it may not be dirty).
259 NOISY(tty->print_cr(" LNC: first block is not a non-array object; setting LNC to first card of current chunk");) 259 NOISY(tty->print_cr(" LNC: first block is not a non-array object; setting LNC to first card of current chunk");)
260 assert(lowest_non_clean[cur_chunk_index] == NULL, "Write once : value should be stable hereafter"); 260 assert(lowest_non_clean[cur_chunk_index] == NULL, "Write once : value should be stable hereafter");
261 jbyte* first_card_of_cur_chunk = byte_for(chunk_mr.start()); 261 jbyte* first_card_of_cur_chunk = byte_for(chunk_mr.start());
262 lowest_non_clean[cur_chunk_index] = first_card_of_cur_chunk; 262 lowest_non_clean[cur_chunk_index] = first_card_of_cur_chunk;