Mercurial > hg > truffle
comparison src/share/vm/memory/blockOffsetTable.cpp @ 3746:537a4053b0f9
7042740: CMS: assert(n> q) failed: Looping at: ... blockOffsetTable.cpp:557
Summary: Do a one-step look-ahead, when sweeping free or garbage blocks, to avoid overstepping sweep limit, which may become a non-block-boundary because of a heap expansion delta coalescing with a previously co-terminal free block.
Reviewed-by: brutisso, tonyp
author | ysr |
---|---|
date | Mon, 23 May 2011 16:42:14 -0700 |
parents | 7d64aa23eb96 |
children | d2a62e0f25eb |
comparison
equal
deleted
inserted
replaced
3397:cfbca4d74a61 | 3746:537a4053b0f9 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2000, 2011, 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. |
564 while (n <= addr) { | 564 while (n <= addr) { |
565 debug_only(HeapWord* last = q); // for debugging | 565 debug_only(HeapWord* last = q); // for debugging |
566 q = n; | 566 q = n; |
567 n += _sp->block_size(n); | 567 n += _sp->block_size(n); |
568 assert(n > q, | 568 assert(n > q, |
569 err_msg("Looping at n = " PTR_FORMAT " with last = " PTR_FORMAT " _sp = [" PTR_FORMAT "," PTR_FORMAT ")", | 569 err_msg("Looping at n = " PTR_FORMAT " with last = " PTR_FORMAT"," |
570 n, last, _sp->bottom(), _sp->end())); | 570 " while querying blk_start(" PTR_FORMAT ")" |
571 } | 571 " on _sp = [" PTR_FORMAT "," PTR_FORMAT ")", |
572 assert(q <= addr, err_msg("wrong order for current (" INTPTR_FORMAT ") <= arg (" INTPTR_FORMAT ")", q, addr)); | 572 n, last, addr, _sp->bottom(), _sp->end())); |
573 assert(addr <= n, err_msg("wrong order for arg (" INTPTR_FORMAT ") <= next (" INTPTR_FORMAT ")", addr, n)); | 573 } |
574 assert(q <= addr, | |
575 err_msg("wrong order for current (" INTPTR_FORMAT ")" " <= arg (" INTPTR_FORMAT ")", | |
576 q, addr)); | |
577 assert(addr <= n, | |
578 err_msg("wrong order for arg (" INTPTR_FORMAT ") <= next (" INTPTR_FORMAT ")", | |
579 addr, n)); | |
574 return q; | 580 return q; |
575 } | 581 } |
576 | 582 |
577 HeapWord* BlockOffsetArrayNonContigSpace::block_start_careful( | 583 HeapWord* BlockOffsetArrayNonContigSpace::block_start_careful( |
578 const void* addr) const { | 584 const void* addr) const { |