< prev index next >

src/share/vm/gc/parallel/cardTableExtension.cpp

Print this page
rev 8362 : 8079792: GC directory structure cleanup
Reviewed-by:


   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  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
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "gc_implementation/parallelScavenge/cardTableExtension.hpp"
  27 #include "gc_implementation/parallelScavenge/gcTaskManager.hpp"
  28 #include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp"
  29 #include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
  30 #include "gc_implementation/parallelScavenge/psScavenge.hpp"
  31 #include "gc_implementation/parallelScavenge/psTasks.hpp"
  32 #include "gc_implementation/parallelScavenge/psYoungGen.hpp"
  33 #include "oops/oop.inline.hpp"
  34 #include "runtime/prefetch.inline.hpp"
  35 
  36 // Checks an individual oop for missing precise marks. Mark
  37 // may be either dirty or newgen.
  38 class CheckForUnmarkedOops : public OopClosure {
  39  private:
  40   PSYoungGen*         _young_gen;
  41   CardTableExtension* _card_table;
  42   HeapWord*           _unmarked_addr;
  43   jbyte*              _unmarked_card;
  44 
  45  protected:
  46   template <class T> void do_oop_work(T* p) {
  47     oop obj = oopDesc::load_decode_heap_oop(p);
  48     if (_young_gen->is_in_reserved(obj) &&
  49         !_card_table->addr_is_marked_imprecise(p)) {
  50       // Don't overwrite the first missing card mark
  51       if (_unmarked_addr == NULL) {
  52         _unmarked_addr = (HeapWord*)p;




   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  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
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "gc/parallel/cardTableExtension.hpp"
  27 #include "gc/parallel/gcTaskManager.hpp"
  28 #include "gc/parallel/parallelScavengeHeap.hpp"
  29 #include "gc/parallel/psPromotionManager.inline.hpp"
  30 #include "gc/parallel/psScavenge.hpp"
  31 #include "gc/parallel/psTasks.hpp"
  32 #include "gc/parallel/psYoungGen.hpp"
  33 #include "oops/oop.inline.hpp"
  34 #include "runtime/prefetch.inline.hpp"
  35 
  36 // Checks an individual oop for missing precise marks. Mark
  37 // may be either dirty or newgen.
  38 class CheckForUnmarkedOops : public OopClosure {
  39  private:
  40   PSYoungGen*         _young_gen;
  41   CardTableExtension* _card_table;
  42   HeapWord*           _unmarked_addr;
  43   jbyte*              _unmarked_card;
  44 
  45  protected:
  46   template <class T> void do_oop_work(T* p) {
  47     oop obj = oopDesc::load_decode_heap_oop(p);
  48     if (_young_gen->is_in_reserved(obj) &&
  49         !_card_table->addr_is_marked_imprecise(p)) {
  50       // Don't overwrite the first missing card mark
  51       if (_unmarked_addr == NULL) {
  52         _unmarked_addr = (HeapWord*)p;


< prev index next >