review request (M) - 6725714 add a table to speed up bitmap searches
Jon Masamitsu
jon.masamitsu at oracle.com
Wed May 29 20:24:53 UTC 2013
On 5/29/2013 2:40 AM, John Coomes wrote:
> Jon Masamitsu (jon.masamitsu at oracle.com) wrote:
>> John,
>>
>> http://cr.openjdk.java.net/~jcoomes/6725714-blocktable/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp.frames.html
>>
>> It seems like you could update the offset for the last block in the
>> region but skip added up the live data in the last block. Does
>> this code do that?
> Yes.
Ok
>
>> Adding up the live data for the last block would be useful only
>> for updating the first block of the next region (which you're not
>> doing), right?
> Right; fill_blocks() only fills the blocks for a single region.
>
> FWIW, there's no need to carry over a total to the next region. The
> block->offset value is the number of live words *in the region* that
> are to the left of the first obj that starts in the block.
>
>> 3262 size_t beg_bit = bitmap->words_to_bits(region_idx << Log2RegionSize);
>> 3263 const size_t range_end = beg_bit + bitmap->words_to_bits(RegionSize);
>> 3264 size_t live_bits = bitmap->words_to_bits(partial_obj_size);
>> 3265 beg_bit = bitmap->find_obj_beg(beg_bit + live_bits, range_end);
>> 3266 while (beg_bit < range_end) {
>> 3267 const size_t new_block = beg_bit >> Log2BitsPerBlock;
>> 3268 if (new_block != cur_block) {
>> 3269 cur_block = new_block;
>> 3270 sd.block(cur_block)->set_offset(bitmap->bits_to_words(live_bits));
>> 3271 }
>> 3272
>> 3273 const size_t end_bit = bitmap->find_obj_end(beg_bit, range_end);
>> 3274 if (end_bit < range_end - 1) {
>> 3275 live_bits += end_bit - beg_bit + 1;
>> 3276 beg_bit = bitmap->find_obj_beg(end_bit + 1, range_end);
>> 3277 } else {
>> 3278 return;
>> 3279 }
>> 3280 }
>>
>> Is region_calc_new_pointer() used?
> No, it's not. It was useful for verification during initial
> development, when region sizes were smaller. I'll remove it.
Thanks.
Jon
>
> Thanks for looking at it.
>
> -John
>
>> On 5/23/2013 8:03 AM, John Coomes wrote:
>>> Please review the following change which adds a new table (the
>>> 'BlockTable') to the parallel compacting collector:
>>>
>>> http://cr.openjdk.java.net/~jcoomes/6725714-blocktable/
>>>
>>> I've run a number of test suites (vm.regression, vm.gc, vm.runtime,
>>> nsk.stress, nsk.monitoring, vm.compiler) in 32- and 64-bit on solaris
>>> and/or linux.
>>>
>>> -John
More information about the hotspot-gc-dev
mailing list