src/hotspot/share/gc/cms/cmsOopClosures.hpp
author coleenp
Tue, 03 Oct 2017 16:42:04 -0400
changeset 47580 96392e113a0a
parent 47216 71c04702a3d5
child 49827 a4672513d6e3
permissions -rw-r--r--
8186777: Make Klass::_java_mirror an OopHandle Summary: Add indirection for fetching mirror so that GC doesn't have to follow CLD::_klasses Reviewed-by: hseigel, thartmann, eosterlund, stefank Contributed-by: coleen.phillimore@oracle.com, rickard.backman@oracle.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
47580
96392e113a0a 8186777: Make Klass::_java_mirror an OopHandle
coleenp
parents: 47216
diff changeset
     2
 * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
 *
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 3913
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 3913
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 3913
diff changeset
    21
 * questions.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
 */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
30764
fec48bf5a827 8079792: GC directory structure cleanup
pliden
parents: 25356
diff changeset
    25
#ifndef SHARE_VM_GC_CMS_CMSOOPCLOSURES_HPP
fec48bf5a827 8079792: GC directory structure cleanup
pliden
parents: 25356
diff changeset
    26
#define SHARE_VM_GC_CMS_CMSOOPCLOSURES_HPP
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    27
30764
fec48bf5a827 8079792: GC directory structure cleanup
pliden
parents: 25356
diff changeset
    28
#include "gc/shared/genOopClosures.hpp"
30878
f1702744b3a4 8080877: Don't use workers()->total_workers() when walking G1CollectedHeap::_task_queues
stefank
parents: 30764
diff changeset
    29
#include "gc/shared/taskqueue.hpp"
25356
4a4a482298a6 8046670: Make CMS metadata aware closures applicable for other collectors
stefank
parents: 23539
diff changeset
    30
#include "memory/iterator.hpp"
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    31
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    32
/////////////////////////////////////////////////////////////////
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
// Closures used by ConcurrentMarkSweepGeneration's collector
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
/////////////////////////////////////////////////////////////////
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
class ConcurrentMarkSweepGeneration;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
class CMSBitMap;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
class CMSMarkStack;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
class CMSCollector;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
class MarkFromRootsClosure;
35492
c8c0273e6b91 8146690: Make all classes in GC follow the naming convention.
david
parents: 32606
diff changeset
    40
class ParMarkFromRootsClosure;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
    42
// Decode the oop and call do_oop on it.
35862
411842d0c882 8146395: Add inline qualifier in oop.hpp and fix inlining in gc files
goetz
parents: 35492
diff changeset
    43
#define DO_OOP_WORK_DEFN                             \
411842d0c882 8146395: Add inline qualifier in oop.hpp and fix inlining in gc files
goetz
parents: 35492
diff changeset
    44
  void do_oop(oop obj);                              \
411842d0c882 8146395: Add inline qualifier in oop.hpp and fix inlining in gc files
goetz
parents: 35492
diff changeset
    45
  template <class T> inline void do_oop_work(T* p);
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
    46
25356
4a4a482298a6 8046670: Make CMS metadata aware closures applicable for other collectors
stefank
parents: 23539
diff changeset
    47
// TODO: This duplication of the MetadataAwareOopClosure class is only needed
4a4a482298a6 8046670: Make CMS metadata aware closures applicable for other collectors
stefank
parents: 23539
diff changeset
    48
//       because some CMS OopClosures derive from OopsInGenClosure. It would be
4a4a482298a6 8046670: Make CMS metadata aware closures applicable for other collectors
stefank
parents: 23539
diff changeset
    49
//       good to get rid of them completely.
4a4a482298a6 8046670: Make CMS metadata aware closures applicable for other collectors
stefank
parents: 23539
diff changeset
    50
class MetadataAwareOopsInGenClosure: public OopsInGenClosure {
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 7397
diff changeset
    51
 public:
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 7397
diff changeset
    52
  virtual bool do_metadata()    { return do_metadata_nv(); }
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 7397
diff changeset
    53
  inline  bool do_metadata_nv() { return true; }
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 7397
diff changeset
    54
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 7397
diff changeset
    55
  virtual void do_klass(Klass* k);
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 7397
diff changeset
    56
  void do_klass_nv(Klass* k);
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 7397
diff changeset
    57
32606
fdaa30d06ada 8129417: Oop iteration clean-up to remove oop_ms_follow_contents
sjohanss
parents: 30878
diff changeset
    58
  virtual void do_cld(ClassLoaderData* cld) { do_cld_nv(cld); }
fdaa30d06ada 8129417: Oop iteration clean-up to remove oop_ms_follow_contents
sjohanss
parents: 30878
diff changeset
    59
  void do_cld_nv(ClassLoaderData* cld);
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 7397
diff changeset
    60
};
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 7397
diff changeset
    61
25356
4a4a482298a6 8046670: Make CMS metadata aware closures applicable for other collectors
stefank
parents: 23539
diff changeset
    62
class MarkRefsIntoClosure: public MetadataAwareOopsInGenClosure {
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
    63
 private:
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
    64
  const MemRegion _span;
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
    65
  CMSBitMap*      _bitMap;
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
    66
 protected:
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
    67
  DO_OOP_WORK_DEFN
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
 public:
3913
e049e6b81e11 6885169: merge of 4957990 and 6863023 causes conflict on do_nmethods
jrose
parents: 3912
diff changeset
    69
  MarkRefsIntoClosure(MemRegion span, CMSBitMap* bitMap);
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
    70
  virtual void do_oop(oop* p);
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
    71
  virtual void do_oop(narrowOop* p);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
35492
c8c0273e6b91 8146690: Make all classes in GC follow the naming convention.
david
parents: 32606
diff changeset
    74
class ParMarkRefsIntoClosure: public MetadataAwareOopsInGenClosure {
18996
05c86e558c94 6412968: CMS Long initial mark pauses
jmasa
parents: 13728
diff changeset
    75
 private:
05c86e558c94 6412968: CMS Long initial mark pauses
jmasa
parents: 13728
diff changeset
    76
  const MemRegion _span;
05c86e558c94 6412968: CMS Long initial mark pauses
jmasa
parents: 13728
diff changeset
    77
  CMSBitMap*      _bitMap;
05c86e558c94 6412968: CMS Long initial mark pauses
jmasa
parents: 13728
diff changeset
    78
 protected:
05c86e558c94 6412968: CMS Long initial mark pauses
jmasa
parents: 13728
diff changeset
    79
  DO_OOP_WORK_DEFN
05c86e558c94 6412968: CMS Long initial mark pauses
jmasa
parents: 13728
diff changeset
    80
 public:
35492
c8c0273e6b91 8146690: Make all classes in GC follow the naming convention.
david
parents: 32606
diff changeset
    81
  ParMarkRefsIntoClosure(MemRegion span, CMSBitMap* bitMap);
18996
05c86e558c94 6412968: CMS Long initial mark pauses
jmasa
parents: 13728
diff changeset
    82
  virtual void do_oop(oop* p);
05c86e558c94 6412968: CMS Long initial mark pauses
jmasa
parents: 13728
diff changeset
    83
  virtual void do_oop(narrowOop* p);
05c86e558c94 6412968: CMS Long initial mark pauses
jmasa
parents: 13728
diff changeset
    84
};
05c86e558c94 6412968: CMS Long initial mark pauses
jmasa
parents: 13728
diff changeset
    85
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
// A variant of the above used in certain kinds of CMS
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
// marking verification.
25356
4a4a482298a6 8046670: Make CMS metadata aware closures applicable for other collectors
stefank
parents: 23539
diff changeset
    88
class MarkRefsIntoVerifyClosure: public MetadataAwareOopsInGenClosure {
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
    89
 private:
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
    90
  const MemRegion _span;
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
    91
  CMSBitMap*      _verification_bm;
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
    92
  CMSBitMap*      _cms_bm;
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
    93
 protected:
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
    94
  DO_OOP_WORK_DEFN
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
  MarkRefsIntoVerifyClosure(MemRegion span, CMSBitMap* verification_bm,
3913
e049e6b81e11 6885169: merge of 4957990 and 6863023 causes conflict on do_nmethods
jrose
parents: 3912
diff changeset
    97
                            CMSBitMap* cms_bm);
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
    98
  virtual void do_oop(oop* p);
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
    99
  virtual void do_oop(narrowOop* p);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 7397
diff changeset
   102
// The non-parallel version (the parallel version appears further below).
25356
4a4a482298a6 8046670: Make CMS metadata aware closures applicable for other collectors
stefank
parents: 23539
diff changeset
   103
class PushAndMarkClosure: public MetadataAwareOopClosure {
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 7397
diff changeset
   104
 private:
3690
dba50b88bd50 6798898: CMS: bugs related to class unloading
jmasa
parents: 1605
diff changeset
   105
  CMSCollector* _collector;
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   106
  MemRegion     _span;
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   107
  CMSBitMap*    _bit_map;
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   108
  CMSBitMap*    _mod_union_table;
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   109
  CMSMarkStack* _mark_stack;
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   110
  bool          _concurrent_precleaning;
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   111
 protected:
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   112
  DO_OOP_WORK_DEFN
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
  PushAndMarkClosure(CMSCollector* collector,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
                     MemRegion span,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
                     ReferenceProcessor* rp,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   117
                     CMSBitMap* bit_map,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
                     CMSBitMap* mod_union_table,
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   119
                     CMSMarkStack* mark_stack,
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   120
                     bool concurrent_precleaning);
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   121
  virtual void do_oop(oop* p);
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   122
  virtual void do_oop(narrowOop* p);
35862
411842d0c882 8146395: Add inline qualifier in oop.hpp and fix inlining in gc files
goetz
parents: 35492
diff changeset
   123
  inline void do_oop_nv(oop* p);
411842d0c882 8146395: Add inline qualifier in oop.hpp and fix inlining in gc files
goetz
parents: 35492
diff changeset
   124
  inline void do_oop_nv(narrowOop* p);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   125
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   126
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 7397
diff changeset
   127
// In the parallel case, the bit map and the
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   128
// reference processor are currently all shared. Access to
489c9b5090e2 Initial load
duke
parents:
diff changeset
   129
// these shared mutable structures must use appropriate
489c9b5090e2 Initial load
duke
parents:
diff changeset
   130
// synchronization (for instance, via CAS). The marking stack
489c9b5090e2 Initial load
duke
parents:
diff changeset
   131
// used in the non-parallel case above is here replaced with
489c9b5090e2 Initial load
duke
parents:
diff changeset
   132
// an OopTaskQueue structure to allow efficient work stealing.
35492
c8c0273e6b91 8146690: Make all classes in GC follow the naming convention.
david
parents: 32606
diff changeset
   133
class ParPushAndMarkClosure: public MetadataAwareOopClosure {
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   134
 private:
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 7397
diff changeset
   135
  CMSCollector* _collector;
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   136
  MemRegion     _span;
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   137
  CMSBitMap*    _bit_map;
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   138
  OopTaskQueue* _work_queue;
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   139
 protected:
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   140
  DO_OOP_WORK_DEFN
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
 public:
35492
c8c0273e6b91 8146690: Make all classes in GC follow the naming convention.
david
parents: 32606
diff changeset
   142
  ParPushAndMarkClosure(CMSCollector* collector,
c8c0273e6b91 8146690: Make all classes in GC follow the naming convention.
david
parents: 32606
diff changeset
   143
                        MemRegion span,
c8c0273e6b91 8146690: Make all classes in GC follow the naming convention.
david
parents: 32606
diff changeset
   144
                        ReferenceProcessor* rp,
c8c0273e6b91 8146690: Make all classes in GC follow the naming convention.
david
parents: 32606
diff changeset
   145
                        CMSBitMap* bit_map,
c8c0273e6b91 8146690: Make all classes in GC follow the naming convention.
david
parents: 32606
diff changeset
   146
                        OopTaskQueue* work_queue);
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   147
  virtual void do_oop(oop* p);
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   148
  virtual void do_oop(narrowOop* p);
35862
411842d0c882 8146395: Add inline qualifier in oop.hpp and fix inlining in gc files
goetz
parents: 35492
diff changeset
   149
  inline void do_oop_nv(oop* p);
411842d0c882 8146395: Add inline qualifier in oop.hpp and fix inlining in gc files
goetz
parents: 35492
diff changeset
   150
  inline void do_oop_nv(narrowOop* p);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   151
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   152
489c9b5090e2 Initial load
duke
parents:
diff changeset
   153
// The non-parallel version (the parallel version appears further below).
25356
4a4a482298a6 8046670: Make CMS metadata aware closures applicable for other collectors
stefank
parents: 23539
diff changeset
   154
class MarkRefsIntoAndScanClosure: public MetadataAwareOopsInGenClosure {
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   155
 private:
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   156
  MemRegion          _span;
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   157
  CMSBitMap*         _bit_map;
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   158
  CMSMarkStack*      _mark_stack;
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   159
  PushAndMarkClosure _pushAndMarkClosure;
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   160
  CMSCollector*      _collector;
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   161
  Mutex*             _freelistLock;
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   162
  bool               _yield;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   163
  // Whether closure is being used for concurrent precleaning
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   164
  bool               _concurrent_precleaning;
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   165
 protected:
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   166
  DO_OOP_WORK_DEFN
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   167
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   168
  MarkRefsIntoAndScanClosure(MemRegion span,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   169
                             ReferenceProcessor* rp,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   170
                             CMSBitMap* bit_map,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   171
                             CMSBitMap* mod_union_table,
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   172
                             CMSMarkStack* mark_stack,
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   173
                             CMSCollector* collector,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   174
                             bool should_yield,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   175
                             bool concurrent_precleaning);
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   176
  virtual void do_oop(oop* p);
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   177
  virtual void do_oop(narrowOop* p);
35862
411842d0c882 8146395: Add inline qualifier in oop.hpp and fix inlining in gc files
goetz
parents: 35492
diff changeset
   178
  inline void do_oop_nv(oop* p);
411842d0c882 8146395: Add inline qualifier in oop.hpp and fix inlining in gc files
goetz
parents: 35492
diff changeset
   179
  inline void do_oop_nv(narrowOop* p);
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 7397
diff changeset
   180
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   181
  void set_freelistLock(Mutex* m) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   182
    _freelistLock = m;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   183
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   184
489c9b5090e2 Initial load
duke
parents:
diff changeset
   185
 private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   186
  inline void do_yield_check();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   187
  void do_yield_work();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   188
  bool take_from_overflow_list();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   189
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   190
22551
9bf46d16dcc6 8025856: Fix typos in the GC code
jwilhelm
parents: 22234
diff changeset
   191
// In this, the parallel avatar of MarkRefsIntoAndScanClosure, the revisit
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   192
// stack and the bitMap are shared, so access needs to be suitably
22551
9bf46d16dcc6 8025856: Fix typos in the GC code
jwilhelm
parents: 22234
diff changeset
   193
// synchronized. An OopTaskQueue structure, supporting efficient
9bf46d16dcc6 8025856: Fix typos in the GC code
jwilhelm
parents: 22234
diff changeset
   194
// work stealing, replaces a CMSMarkStack for storing grey objects.
35492
c8c0273e6b91 8146690: Make all classes in GC follow the naming convention.
david
parents: 32606
diff changeset
   195
class ParMarkRefsIntoAndScanClosure: public MetadataAwareOopsInGenClosure {
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   196
 private:
35492
c8c0273e6b91 8146690: Make all classes in GC follow the naming convention.
david
parents: 32606
diff changeset
   197
  MemRegion             _span;
c8c0273e6b91 8146690: Make all classes in GC follow the naming convention.
david
parents: 32606
diff changeset
   198
  CMSBitMap*            _bit_map;
c8c0273e6b91 8146690: Make all classes in GC follow the naming convention.
david
parents: 32606
diff changeset
   199
  OopTaskQueue*         _work_queue;
c8c0273e6b91 8146690: Make all classes in GC follow the naming convention.
david
parents: 32606
diff changeset
   200
  const uint            _low_water_mark;
c8c0273e6b91 8146690: Make all classes in GC follow the naming convention.
david
parents: 32606
diff changeset
   201
  ParPushAndMarkClosure _parPushAndMarkClosure;
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   202
 protected:
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   203
  DO_OOP_WORK_DEFN
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   204
 public:
35492
c8c0273e6b91 8146690: Make all classes in GC follow the naming convention.
david
parents: 32606
diff changeset
   205
  ParMarkRefsIntoAndScanClosure(CMSCollector* collector,
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   206
                                 MemRegion span,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   207
                                 ReferenceProcessor* rp,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   208
                                 CMSBitMap* bit_map,
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 7397
diff changeset
   209
                                 OopTaskQueue* work_queue);
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   210
  virtual void do_oop(oop* p);
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   211
  virtual void do_oop(narrowOop* p);
35862
411842d0c882 8146395: Add inline qualifier in oop.hpp and fix inlining in gc files
goetz
parents: 35492
diff changeset
   212
  inline void do_oop_nv(oop* p);
411842d0c882 8146395: Add inline qualifier in oop.hpp and fix inlining in gc files
goetz
parents: 35492
diff changeset
   213
  inline void do_oop_nv(narrowOop* p);
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 7397
diff changeset
   214
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   215
  void trim_queue(uint size);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   216
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   217
489c9b5090e2 Initial load
duke
parents:
diff changeset
   218
// This closure is used during the concurrent marking phase
489c9b5090e2 Initial load
duke
parents:
diff changeset
   219
// following the first checkpoint. Its use is buried in
489c9b5090e2 Initial load
duke
parents:
diff changeset
   220
// the closure MarkFromRootsClosure.
25356
4a4a482298a6 8046670: Make CMS metadata aware closures applicable for other collectors
stefank
parents: 23539
diff changeset
   221
class PushOrMarkClosure: public MetadataAwareOopClosure {
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   222
 private:
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 7397
diff changeset
   223
  CMSCollector*   _collector;
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   224
  MemRegion       _span;
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   225
  CMSBitMap*      _bitMap;
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   226
  CMSMarkStack*   _markStack;
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   227
  HeapWord* const _finger;
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   228
  MarkFromRootsClosure* const
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   229
                  _parent;
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   230
 protected:
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   231
  DO_OOP_WORK_DEFN
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   232
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   233
  PushOrMarkClosure(CMSCollector* cms_collector,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   234
                    MemRegion span,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   235
                    CMSBitMap* bitMap,
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   236
                    CMSMarkStack* markStack,
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   237
                    HeapWord* finger,
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   238
                    MarkFromRootsClosure* parent);
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   239
  virtual void do_oop(oop* p);
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   240
  virtual void do_oop(narrowOop* p);
35862
411842d0c882 8146395: Add inline qualifier in oop.hpp and fix inlining in gc files
goetz
parents: 35492
diff changeset
   241
  inline void do_oop_nv(oop* p);
411842d0c882 8146395: Add inline qualifier in oop.hpp and fix inlining in gc files
goetz
parents: 35492
diff changeset
   242
  inline void do_oop_nv(narrowOop* p);
3696
9e5d9b5e1049 4957990: Perm heap bloat in JVM
ysr
parents: 3690
diff changeset
   243
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   244
  // Deal with a stack overflow condition
489c9b5090e2 Initial load
duke
parents:
diff changeset
   245
  void handle_stack_overflow(HeapWord* lost);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   246
 private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   247
  inline void do_yield_check();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   248
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   249
489c9b5090e2 Initial load
duke
parents:
diff changeset
   250
// A parallel (MT) version of the above.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   251
// This closure is used during the concurrent marking phase
489c9b5090e2 Initial load
duke
parents:
diff changeset
   252
// following the first checkpoint. Its use is buried in
35492
c8c0273e6b91 8146690: Make all classes in GC follow the naming convention.
david
parents: 32606
diff changeset
   253
// the closure ParMarkFromRootsClosure.
c8c0273e6b91 8146690: Make all classes in GC follow the naming convention.
david
parents: 32606
diff changeset
   254
class ParPushOrMarkClosure: public MetadataAwareOopClosure {
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   255
 private:
41283
2615c024f3eb 8033552: Fix missing missing volatile specifiers in CAS operations in GC code
eosterlund
parents: 35862
diff changeset
   256
  CMSCollector*                  _collector;
2615c024f3eb 8033552: Fix missing missing volatile specifiers in CAS operations in GC code
eosterlund
parents: 35862
diff changeset
   257
  MemRegion                      _whole_span;
2615c024f3eb 8033552: Fix missing missing volatile specifiers in CAS operations in GC code
eosterlund
parents: 35862
diff changeset
   258
  MemRegion                      _span;       // local chunk
2615c024f3eb 8033552: Fix missing missing volatile specifiers in CAS operations in GC code
eosterlund
parents: 35862
diff changeset
   259
  CMSBitMap*                     _bit_map;
2615c024f3eb 8033552: Fix missing missing volatile specifiers in CAS operations in GC code
eosterlund
parents: 35862
diff changeset
   260
  OopTaskQueue*                  _work_queue;
2615c024f3eb 8033552: Fix missing missing volatile specifiers in CAS operations in GC code
eosterlund
parents: 35862
diff changeset
   261
  CMSMarkStack*                  _overflow_stack;
2615c024f3eb 8033552: Fix missing missing volatile specifiers in CAS operations in GC code
eosterlund
parents: 35862
diff changeset
   262
  HeapWord*  const               _finger;
2615c024f3eb 8033552: Fix missing missing volatile specifiers in CAS operations in GC code
eosterlund
parents: 35862
diff changeset
   263
  HeapWord* volatile* const      _global_finger_addr;
2615c024f3eb 8033552: Fix missing missing volatile specifiers in CAS operations in GC code
eosterlund
parents: 35862
diff changeset
   264
  ParMarkFromRootsClosure* const _parent;
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   265
 protected:
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   266
  DO_OOP_WORK_DEFN
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   267
 public:
35492
c8c0273e6b91 8146690: Make all classes in GC follow the naming convention.
david
parents: 32606
diff changeset
   268
  ParPushOrMarkClosure(CMSCollector* cms_collector,
c8c0273e6b91 8146690: Make all classes in GC follow the naming convention.
david
parents: 32606
diff changeset
   269
                       MemRegion span,
c8c0273e6b91 8146690: Make all classes in GC follow the naming convention.
david
parents: 32606
diff changeset
   270
                       CMSBitMap* bit_map,
c8c0273e6b91 8146690: Make all classes in GC follow the naming convention.
david
parents: 32606
diff changeset
   271
                       OopTaskQueue* work_queue,
c8c0273e6b91 8146690: Make all classes in GC follow the naming convention.
david
parents: 32606
diff changeset
   272
                       CMSMarkStack* mark_stack,
c8c0273e6b91 8146690: Make all classes in GC follow the naming convention.
david
parents: 32606
diff changeset
   273
                       HeapWord* finger,
41283
2615c024f3eb 8033552: Fix missing missing volatile specifiers in CAS operations in GC code
eosterlund
parents: 35862
diff changeset
   274
                       HeapWord* volatile* global_finger_addr,
35492
c8c0273e6b91 8146690: Make all classes in GC follow the naming convention.
david
parents: 32606
diff changeset
   275
                       ParMarkFromRootsClosure* parent);
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   276
  virtual void do_oop(oop* p);
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   277
  virtual void do_oop(narrowOop* p);
35862
411842d0c882 8146395: Add inline qualifier in oop.hpp and fix inlining in gc files
goetz
parents: 35492
diff changeset
   278
  inline void do_oop_nv(oop* p);
411842d0c882 8146395: Add inline qualifier in oop.hpp and fix inlining in gc files
goetz
parents: 35492
diff changeset
   279
  inline void do_oop_nv(narrowOop* p);
3696
9e5d9b5e1049 4957990: Perm heap bloat in JVM
ysr
parents: 3690
diff changeset
   280
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   281
  // Deal with a stack overflow condition
489c9b5090e2 Initial load
duke
parents:
diff changeset
   282
  void handle_stack_overflow(HeapWord* lost);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   283
 private:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   284
  inline void do_yield_check();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   285
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   286
489c9b5090e2 Initial load
duke
parents:
diff changeset
   287
// For objects in CMS generation, this closure marks
489c9b5090e2 Initial load
duke
parents:
diff changeset
   288
// given objects (transitively) as being reachable/live.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   289
// This is currently used during the (weak) reference object
1605
6b43d186eb8d 6722113: CMS: Incorrect overflow handling during precleaning of Reference lists
ysr
parents: 390
diff changeset
   290
// processing phase of the CMS final checkpoint step, as
6b43d186eb8d 6722113: CMS: Incorrect overflow handling during precleaning of Reference lists
ysr
parents: 390
diff changeset
   291
// well as during the concurrent precleaning of the discovered
6b43d186eb8d 6722113: CMS: Incorrect overflow handling during precleaning of Reference lists
ysr
parents: 390
diff changeset
   292
// reference lists.
25356
4a4a482298a6 8046670: Make CMS metadata aware closures applicable for other collectors
stefank
parents: 23539
diff changeset
   293
class CMSKeepAliveClosure: public MetadataAwareOopClosure {
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   294
 private:
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 7397
diff changeset
   295
  CMSCollector* _collector;
390
2e094c1be4af 6662086: 6u4+, 7b11+: CMS never clears referents when -XX:+ParallelRefProcEnabled
ysr
parents: 360
diff changeset
   296
  const MemRegion _span;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   297
  CMSMarkStack* _mark_stack;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   298
  CMSBitMap*    _bit_map;
1605
6b43d186eb8d 6722113: CMS: Incorrect overflow handling during precleaning of Reference lists
ysr
parents: 390
diff changeset
   299
  bool          _concurrent_precleaning;
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   300
 protected:
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   301
  DO_OOP_WORK_DEFN
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   302
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   303
  CMSKeepAliveClosure(CMSCollector* collector, MemRegion span,
1605
6b43d186eb8d 6722113: CMS: Incorrect overflow handling during precleaning of Reference lists
ysr
parents: 390
diff changeset
   304
                      CMSBitMap* bit_map, CMSMarkStack* mark_stack,
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 7397
diff changeset
   305
                      bool cpc);
1605
6b43d186eb8d 6722113: CMS: Incorrect overflow handling during precleaning of Reference lists
ysr
parents: 390
diff changeset
   306
  bool    concurrent_precleaning() const { return _concurrent_precleaning; }
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   307
  virtual void do_oop(oop* p);
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   308
  virtual void do_oop(narrowOop* p);
35862
411842d0c882 8146395: Add inline qualifier in oop.hpp and fix inlining in gc files
goetz
parents: 35492
diff changeset
   309
  inline void do_oop_nv(oop* p);
411842d0c882 8146395: Add inline qualifier in oop.hpp and fix inlining in gc files
goetz
parents: 35492
diff changeset
   310
  inline void do_oop_nv(narrowOop* p);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   311
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   312
25356
4a4a482298a6 8046670: Make CMS metadata aware closures applicable for other collectors
stefank
parents: 23539
diff changeset
   313
class CMSInnerParMarkAndPushClosure: public MetadataAwareOopClosure {
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   314
 private:
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 7397
diff changeset
   315
  CMSCollector* _collector;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   316
  MemRegion     _span;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   317
  OopTaskQueue* _work_queue;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   318
  CMSBitMap*    _bit_map;
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   319
 protected:
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   320
  DO_OOP_WORK_DEFN
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   321
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   322
  CMSInnerParMarkAndPushClosure(CMSCollector* collector,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   323
                                MemRegion span, CMSBitMap* bit_map,
3690
dba50b88bd50 6798898: CMS: bugs related to class unloading
jmasa
parents: 1605
diff changeset
   324
                                OopTaskQueue* work_queue);
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   325
  virtual void do_oop(oop* p);
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   326
  virtual void do_oop(narrowOop* p);
35862
411842d0c882 8146395: Add inline qualifier in oop.hpp and fix inlining in gc files
goetz
parents: 35492
diff changeset
   327
  inline void do_oop_nv(oop* p);
411842d0c882 8146395: Add inline qualifier in oop.hpp and fix inlining in gc files
goetz
parents: 35492
diff changeset
   328
  inline void do_oop_nv(narrowOop* p);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   329
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
   330
489c9b5090e2 Initial load
duke
parents:
diff changeset
   331
// A parallel (MT) version of the above, used when
489c9b5090e2 Initial load
duke
parents:
diff changeset
   332
// reference processing is parallel; the only difference
489c9b5090e2 Initial load
duke
parents:
diff changeset
   333
// is in the do_oop method.
25356
4a4a482298a6 8046670: Make CMS metadata aware closures applicable for other collectors
stefank
parents: 23539
diff changeset
   334
class CMSParKeepAliveClosure: public MetadataAwareOopClosure {
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   335
 private:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   336
  MemRegion     _span;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   337
  OopTaskQueue* _work_queue;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   338
  CMSBitMap*    _bit_map;
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   339
  CMSInnerParMarkAndPushClosure
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   340
                _mark_and_push;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   341
  const uint    _low_water_mark;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   342
  void trim_queue(uint max);
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   343
 protected:
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   344
  DO_OOP_WORK_DEFN
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   345
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   346
  CMSParKeepAliveClosure(CMSCollector* collector, MemRegion span,
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 7397
diff changeset
   347
                         CMSBitMap* bit_map, OopTaskQueue* work_queue);
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   348
  virtual void do_oop(oop* p);
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 1
diff changeset
   349
  virtual void do_oop(narrowOop* p);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   350
};
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   351
30764
fec48bf5a827 8079792: GC directory structure cleanup
pliden
parents: 25356
diff changeset
   352
#endif // SHARE_VM_GC_CMS_CMSOOPCLOSURES_HPP