hotspot/src/share/vm/gc_implementation/g1/heapRegionSets.hpp
author tschatzl
Mon, 20 Jan 2014 11:47:07 +0100
changeset 22545 b93a7f0e9b9d
parent 10996 b9d07748e5b3
permissions -rw-r--r--
8027476: Improve performance of Stringtable unlink 8027455: Improve symbol table scan times during gc pauses Summary: Parallelize string table and symbol table scan during remark and full GC. Some additional statistics output if the experimental flag G1TraceStringSymbolTableScrubbing is set. Reviewed-by: mgerdin, coleenp, brutisso
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7923
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
     1
/*
9988
01f84e2c3fc0 7045662: G1: OopsInHeapRegionClosure::set_region() should not be virtual
tonyp
parents: 7923
diff changeset
     2
 * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
7923
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
     4
 *
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
     7
 * published by the Free Software Foundation.
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
     8
 *
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    13
 * accompanied this code).
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    14
 *
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    18
 *
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    21
 * questions.
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    22
 *
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    23
 */
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    24
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    25
#ifndef SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGIONSETS_HPP
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    26
#define SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGIONSETS_HPP
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    27
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    28
#include "gc_implementation/g1/heapRegionSet.inline.hpp"
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    29
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    30
//////////////////// FreeRegionList ////////////////////
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    31
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    32
class FreeRegionList : public HeapRegionLinkedList {
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    33
protected:
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    34
  virtual const char* verify_region_extra(HeapRegion* hr);
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    35
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    36
  virtual bool regions_humongous() { return false; }
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    37
  virtual bool regions_empty()     { return true;  }
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    38
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    39
public:
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    40
  FreeRegionList(const char* name) : HeapRegionLinkedList(name) { }
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    41
};
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    42
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    43
//////////////////// MasterFreeRegionList ////////////////////
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    44
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    45
class MasterFreeRegionList : public FreeRegionList {
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    46
protected:
10000
5bbb58b0dbb9 7046182: G1: remove unnecessary iterations over the collection set
tonyp
parents: 9988
diff changeset
    47
  virtual const char* verify_region_extra(HeapRegion* hr);
7923
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    48
  virtual bool check_mt_safety();
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    49
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    50
public:
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    51
  MasterFreeRegionList(const char* name) : FreeRegionList(name) { }
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    52
};
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    53
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    54
//////////////////// SecondaryFreeRegionList ////////////////////
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    55
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    56
class SecondaryFreeRegionList : public FreeRegionList {
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    57
protected:
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    58
  virtual bool check_mt_safety();
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    59
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    60
public:
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    61
  SecondaryFreeRegionList(const char* name) : FreeRegionList(name) { }
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    62
};
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    63
10996
b9d07748e5b3 7092309: G1: introduce old region set
tonyp
parents: 10000
diff changeset
    64
//////////////////// OldRegionSet ////////////////////
b9d07748e5b3 7092309: G1: introduce old region set
tonyp
parents: 10000
diff changeset
    65
b9d07748e5b3 7092309: G1: introduce old region set
tonyp
parents: 10000
diff changeset
    66
class OldRegionSet : public HeapRegionSet {
b9d07748e5b3 7092309: G1: introduce old region set
tonyp
parents: 10000
diff changeset
    67
protected:
b9d07748e5b3 7092309: G1: introduce old region set
tonyp
parents: 10000
diff changeset
    68
  virtual const char* verify_region_extra(HeapRegion* hr);
b9d07748e5b3 7092309: G1: introduce old region set
tonyp
parents: 10000
diff changeset
    69
b9d07748e5b3 7092309: G1: introduce old region set
tonyp
parents: 10000
diff changeset
    70
  virtual bool regions_humongous() { return false; }
b9d07748e5b3 7092309: G1: introduce old region set
tonyp
parents: 10000
diff changeset
    71
  virtual bool regions_empty()     { return false; }
b9d07748e5b3 7092309: G1: introduce old region set
tonyp
parents: 10000
diff changeset
    72
b9d07748e5b3 7092309: G1: introduce old region set
tonyp
parents: 10000
diff changeset
    73
public:
b9d07748e5b3 7092309: G1: introduce old region set
tonyp
parents: 10000
diff changeset
    74
  OldRegionSet(const char* name) : HeapRegionSet(name) { }
b9d07748e5b3 7092309: G1: introduce old region set
tonyp
parents: 10000
diff changeset
    75
};
b9d07748e5b3 7092309: G1: introduce old region set
tonyp
parents: 10000
diff changeset
    76
b9d07748e5b3 7092309: G1: introduce old region set
tonyp
parents: 10000
diff changeset
    77
//////////////////// MasterOldRegionSet ////////////////////
b9d07748e5b3 7092309: G1: introduce old region set
tonyp
parents: 10000
diff changeset
    78
b9d07748e5b3 7092309: G1: introduce old region set
tonyp
parents: 10000
diff changeset
    79
class MasterOldRegionSet : public OldRegionSet {
b9d07748e5b3 7092309: G1: introduce old region set
tonyp
parents: 10000
diff changeset
    80
private:
b9d07748e5b3 7092309: G1: introduce old region set
tonyp
parents: 10000
diff changeset
    81
protected:
b9d07748e5b3 7092309: G1: introduce old region set
tonyp
parents: 10000
diff changeset
    82
  virtual bool check_mt_safety();
b9d07748e5b3 7092309: G1: introduce old region set
tonyp
parents: 10000
diff changeset
    83
b9d07748e5b3 7092309: G1: introduce old region set
tonyp
parents: 10000
diff changeset
    84
public:
b9d07748e5b3 7092309: G1: introduce old region set
tonyp
parents: 10000
diff changeset
    85
  MasterOldRegionSet(const char* name) : OldRegionSet(name) { }
b9d07748e5b3 7092309: G1: introduce old region set
tonyp
parents: 10000
diff changeset
    86
};
b9d07748e5b3 7092309: G1: introduce old region set
tonyp
parents: 10000
diff changeset
    87
7923
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    88
//////////////////// HumongousRegionSet ////////////////////
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    89
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    90
class HumongousRegionSet : public HeapRegionSet {
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    91
protected:
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    92
  virtual const char* verify_region_extra(HeapRegion* hr);
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    93
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    94
  virtual bool regions_humongous() { return true;  }
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    95
  virtual bool regions_empty()     { return false; }
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    96
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    97
public:
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    98
  HumongousRegionSet(const char* name) : HeapRegionSet(name) { }
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
    99
};
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   100
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   101
//////////////////// MasterHumongousRegionSet ////////////////////
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   102
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   103
class MasterHumongousRegionSet : public HumongousRegionSet {
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   104
protected:
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   105
  virtual bool check_mt_safety();
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   106
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   107
public:
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   108
  MasterHumongousRegionSet(const char* name) : HumongousRegionSet(name) { }
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   109
};
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   110
fc200fcd4e05 6977804: G1: remove the zero-filling thread
tonyp
parents:
diff changeset
   111
#endif // SHARE_VM_GC_IMPLEMENTATION_G1_HEAPREGIONSETS_HPP