src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp

Print this page


   1 /*
   2  * Copyright (c) 2001, 2009, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   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 "incls/_precompiled.incl"
  26 #include "incls/_heapRegionRemSet.cpp.incl"








  27 
  28 #define HRRS_VERBOSE 0
  29 
  30 #define PRT_COUNT_OCCUPIED 1
  31 
  32 // OtherRegionsTable
  33 
  34 class PerRegionTable: public CHeapObj {
  35   friend class OtherRegionsTable;
  36   friend class HeapRegionRemSetIterator;
  37 
  38   HeapRegion*     _hr;
  39   BitMap          _bm;
  40 #if PRT_COUNT_OCCUPIED
  41   jint            _occupied;
  42 #endif
  43   PerRegionTable* _next_free;
  44 
  45   PerRegionTable* next_free() { return _next_free; }
  46   void set_next_free(PerRegionTable* prt) { _next_free = prt; }


   1 /*
   2  * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   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/g1/concurrentG1Refine.hpp"
  27 #include "gc_implementation/g1/g1BlockOffsetTable.inline.hpp"
  28 #include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
  29 #include "gc_implementation/g1/heapRegionRemSet.hpp"
  30 #include "gc_implementation/g1/heapRegionSeq.inline.hpp"
  31 #include "memory/allocation.hpp"
  32 #include "memory/space.inline.hpp"
  33 #include "utilities/bitMap.inline.hpp"
  34 #include "utilities/globalDefinitions.hpp"
  35 
  36 #define HRRS_VERBOSE 0
  37 
  38 #define PRT_COUNT_OCCUPIED 1
  39 
  40 // OtherRegionsTable
  41 
  42 class PerRegionTable: public CHeapObj {
  43   friend class OtherRegionsTable;
  44   friend class HeapRegionRemSetIterator;
  45 
  46   HeapRegion*     _hr;
  47   BitMap          _bm;
  48 #if PRT_COUNT_OCCUPIED
  49   jint            _occupied;
  50 #endif
  51   PerRegionTable* _next_free;
  52 
  53   PerRegionTable* next_free() { return _next_free; }
  54   void set_next_free(PerRegionTable* prt) { _next_free = prt; }