< prev index next >

src/share/vm/gc/g1/g1StringDedupTable.cpp

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


   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 "classfile/altHashing.hpp"
  27 #include "classfile/javaClasses.inline.hpp"
  28 #include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
  29 #include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
  30 #include "gc_implementation/g1/g1StringDedup.hpp"
  31 #include "gc_implementation/g1/g1StringDedupTable.hpp"
  32 #include "memory/gcLocker.hpp"
  33 #include "memory/padded.inline.hpp"
  34 #include "oops/typeArrayOop.hpp"
  35 #include "oops/oop.inline.hpp"

  36 #include "runtime/mutexLocker.hpp"
  37 
  38 //
  39 // Freelist in the deduplication table entry cache. Links table
  40 // entries together using their _next fields.
  41 //
  42 class G1StringDedupEntryFreeList : public CHeapObj<mtGC> {
  43 private:
  44   G1StringDedupEntry* _list;
  45   size_t              _length;
  46 
  47 public:
  48   G1StringDedupEntryFreeList() :
  49     _list(NULL),
  50     _length(0) {
  51   }
  52 
  53   void add(G1StringDedupEntry* entry) {
  54     entry->set_next(_list);
  55     _list = entry;




   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 "classfile/altHashing.hpp"
  27 #include "classfile/javaClasses.inline.hpp"
  28 #include "gc/g1/g1CollectedHeap.inline.hpp"
  29 #include "gc/g1/g1SATBCardTableModRefBS.hpp"
  30 #include "gc/g1/g1StringDedup.hpp"
  31 #include "gc/g1/g1StringDedupTable.hpp"
  32 #include "gc/shared/gcLocker.hpp"
  33 #include "memory/padded.inline.hpp"

  34 #include "oops/oop.inline.hpp"
  35 #include "oops/typeArrayOop.hpp"
  36 #include "runtime/mutexLocker.hpp"
  37 
  38 //
  39 // Freelist in the deduplication table entry cache. Links table
  40 // entries together using their _next fields.
  41 //
  42 class G1StringDedupEntryFreeList : public CHeapObj<mtGC> {
  43 private:
  44   G1StringDedupEntry* _list;
  45   size_t              _length;
  46 
  47 public:
  48   G1StringDedupEntryFreeList() :
  49     _list(NULL),
  50     _length(0) {
  51   }
  52 
  53   void add(G1StringDedupEntry* entry) {
  54     entry->set_next(_list);
  55     _list = entry;


< prev index next >