< prev index next >

src/share/vm/memory/specialized_oop_closures.hpp

Print this page




  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 #ifndef SHARE_VM_MEMORY_SPECIALIZED_OOP_CLOSURES_HPP
  26 #define SHARE_VM_MEMORY_SPECIALIZED_OOP_CLOSURES_HPP
  27 
  28 #include "runtime/atomic.hpp"
  29 #include "utilities/macros.hpp"
  30 #if INCLUDE_ALL_GCS
  31 #include "gc_implementation/g1/g1_specialized_oop_closures.hpp"

  32 #endif // INCLUDE_ALL_GCS
  33 
  34 // The following OopClosure types get specialized versions of
  35 // "oop_oop_iterate" that invoke the closures' do_oop methods
  36 // non-virtually, using a mechanism defined in this file.  Extend these
  37 // macros in the obvious way to add specializations for new closures.
  38 
  39 // Forward declarations.
  40 class OopClosure;
  41 class OopsInGenClosure;
  42 // DefNew
  43 class ScanClosure;
  44 class FastScanClosure;
  45 class FilteringClosure;
  46 // ParNew
  47 class ParScanWithBarrierClosure;
  48 class ParScanWithoutBarrierClosure;
  49 // CMS
  50 class MarkRefsIntoAndScanClosure;
  51 class Par_MarkRefsIntoAndScanClosure;


  87   f(ParScanWithoutBarrierClosure,_nv)
  88 #else  // INCLUDE_ALL_GCS
  89 #define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_P(f)
  90 #endif // INCLUDE_ALL_GCS
  91 
  92 #define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_1(f)       \
  93   f(NoHeaderExtendedOopClosure,_nv)                     \
  94   SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_S(f)             \
  95   SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_P(f)
  96 
  97 #if INCLUDE_ALL_GCS
  98 #define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_2(f)       \
  99   f(MarkRefsIntoAndScanClosure,_nv)                     \
 100   f(Par_MarkRefsIntoAndScanClosure,_nv)                 \
 101   f(PushAndMarkClosure,_nv)                             \
 102   f(Par_PushAndMarkClosure,_nv)                         \
 103   f(PushOrMarkClosure,_nv)                              \
 104   f(Par_PushOrMarkClosure,_nv)                          \
 105   f(CMSKeepAliveClosure,_nv)                            \
 106   f(CMSInnerParMarkAndPushClosure,_nv)                  \
 107   FURTHER_SPECIALIZED_OOP_OOP_ITERATE_CLOSURES(f)

 108 #else  // INCLUDE_ALL_GCS
 109 #define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_2(f)
 110 #endif // INCLUDE_ALL_GCS
 111 
 112 
 113 // We separate these out, because sometime the general one has
 114 // a different definition from the specialized ones, and sometimes it
 115 // doesn't.
 116 
 117 #define ALL_OOP_OOP_ITERATE_CLOSURES_1(f)               \
 118   f(ExtendedOopClosure,_v)                              \
 119   SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_1(f)
 120 
 121 #define ALL_OOP_OOP_ITERATE_CLOSURES_2(f)               \
 122   SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_2(f)
 123 
 124 #if INCLUDE_ALL_GCS
 125 // This macro applies an argument macro to all OopClosures for which we
 126 // want specialized bodies of a family of methods related to
 127 // "par_oop_iterate".  The arguments to f are the same as above.




  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 #ifndef SHARE_VM_MEMORY_SPECIALIZED_OOP_CLOSURES_HPP
  26 #define SHARE_VM_MEMORY_SPECIALIZED_OOP_CLOSURES_HPP
  27 
  28 #include "runtime/atomic.hpp"
  29 #include "utilities/macros.hpp"
  30 #if INCLUDE_ALL_GCS
  31 #include "gc_implementation/g1/g1_specialized_oop_closures.hpp"
  32 #include "gc_implementation/shenandoah/shenandoah_specialized_oop_closures.hpp"
  33 #endif // INCLUDE_ALL_GCS
  34 
  35 // The following OopClosure types get specialized versions of
  36 // "oop_oop_iterate" that invoke the closures' do_oop methods
  37 // non-virtually, using a mechanism defined in this file.  Extend these
  38 // macros in the obvious way to add specializations for new closures.
  39 
  40 // Forward declarations.
  41 class OopClosure;
  42 class OopsInGenClosure;
  43 // DefNew
  44 class ScanClosure;
  45 class FastScanClosure;
  46 class FilteringClosure;
  47 // ParNew
  48 class ParScanWithBarrierClosure;
  49 class ParScanWithoutBarrierClosure;
  50 // CMS
  51 class MarkRefsIntoAndScanClosure;
  52 class Par_MarkRefsIntoAndScanClosure;


  88   f(ParScanWithoutBarrierClosure,_nv)
  89 #else  // INCLUDE_ALL_GCS
  90 #define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_P(f)
  91 #endif // INCLUDE_ALL_GCS
  92 
  93 #define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_1(f)       \
  94   f(NoHeaderExtendedOopClosure,_nv)                     \
  95   SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_S(f)             \
  96   SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_P(f)
  97 
  98 #if INCLUDE_ALL_GCS
  99 #define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_2(f)       \
 100   f(MarkRefsIntoAndScanClosure,_nv)                     \
 101   f(Par_MarkRefsIntoAndScanClosure,_nv)                 \
 102   f(PushAndMarkClosure,_nv)                             \
 103   f(Par_PushAndMarkClosure,_nv)                         \
 104   f(PushOrMarkClosure,_nv)                              \
 105   f(Par_PushOrMarkClosure,_nv)                          \
 106   f(CMSKeepAliveClosure,_nv)                            \
 107   f(CMSInnerParMarkAndPushClosure,_nv)                  \
 108   FURTHER_SPECIALIZED_OOP_OOP_ITERATE_CLOSURES(f)       \
 109   SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_SHENANDOAH(f)
 110 #else  // INCLUDE_ALL_GCS
 111 #define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_2(f)
 112 #endif // INCLUDE_ALL_GCS
 113 
 114 
 115 // We separate these out, because sometime the general one has
 116 // a different definition from the specialized ones, and sometimes it
 117 // doesn't.
 118 
 119 #define ALL_OOP_OOP_ITERATE_CLOSURES_1(f)               \
 120   f(ExtendedOopClosure,_v)                              \
 121   SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_1(f)
 122 
 123 #define ALL_OOP_OOP_ITERATE_CLOSURES_2(f)               \
 124   SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_2(f)
 125 
 126 #if INCLUDE_ALL_GCS
 127 // This macro applies an argument macro to all OopClosures for which we
 128 // want specialized bodies of a family of methods related to
 129 // "par_oop_iterate".  The arguments to f are the same as above.


< prev index next >