< prev index next >

src/hotspot/share/oops/instanceMirrorKlass.hpp

Print this page


   1 /*
   2  * Copyright (c) 2011, 2017, 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  *


  81     return _offset_of_static_fields;
  82   }
  83 
  84   int compute_static_oop_field_count(oop obj);
  85 
  86   // Given a Klass return the size of the instance
  87   int instance_size(Klass* k);
  88 
  89   // allocation
  90   instanceOop allocate_instance(Klass* k, TRAPS);
  91 
  92   // GC specific object visitors
  93   //
  94 #if INCLUDE_PARALLELGC
  95   // Parallel Scavenge
  96   void oop_ps_push_contents(  oop obj, PSPromotionManager* pm);
  97   // Parallel Compact
  98   void oop_pc_follow_contents(oop obj, ParCompactionManager* cm);
  99   void oop_pc_update_pointers(oop obj, ParCompactionManager* cm);
 100 #endif


 101 
 102   // Oop fields (and metadata) iterators
 103   //
 104   // The InstanceMirrorKlass iterators also visit the hidden Klass pointer.
 105 
 106   // Iterate over the static fields.
 107   template <typename T, class OopClosureType>
 108   inline void oop_oop_iterate_statics(oop obj, OopClosureType* closure);
 109 
 110   // Forward iteration
 111   // Iterate over the oop fields and metadata.
 112   template <typename T, class OopClosureType>
 113   inline void oop_oop_iterate(oop obj, OopClosureType* closure);
 114 
 115   // Reverse iteration
 116   // Iterate over the oop fields and metadata.
 117   template <typename T, class OopClosureType>
 118   inline void oop_oop_iterate_reverse(oop obj, OopClosureType* closure);
 119 
 120   // Bounded range iteration
   1 /*
   2  * Copyright (c) 2011, 2018, 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  *


  81     return _offset_of_static_fields;
  82   }
  83 
  84   int compute_static_oop_field_count(oop obj);
  85 
  86   // Given a Klass return the size of the instance
  87   int instance_size(Klass* k);
  88 
  89   // allocation
  90   instanceOop allocate_instance(Klass* k, TRAPS);
  91 
  92   // GC specific object visitors
  93   //
  94 #if INCLUDE_PARALLELGC
  95   // Parallel Scavenge
  96   void oop_ps_push_contents(  oop obj, PSPromotionManager* pm);
  97   // Parallel Compact
  98   void oop_pc_follow_contents(oop obj, ParCompactionManager* cm);
  99   void oop_pc_update_pointers(oop obj, ParCompactionManager* cm);
 100 #endif
 101 
 102   static void serialize_offsets(class SerializeClosure* f) NOT_CDS_RETURN;
 103 
 104   // Oop fields (and metadata) iterators
 105   //
 106   // The InstanceMirrorKlass iterators also visit the hidden Klass pointer.
 107 
 108   // Iterate over the static fields.
 109   template <typename T, class OopClosureType>
 110   inline void oop_oop_iterate_statics(oop obj, OopClosureType* closure);
 111 
 112   // Forward iteration
 113   // Iterate over the oop fields and metadata.
 114   template <typename T, class OopClosureType>
 115   inline void oop_oop_iterate(oop obj, OopClosureType* closure);
 116 
 117   // Reverse iteration
 118   // Iterate over the oop fields and metadata.
 119   template <typename T, class OopClosureType>
 120   inline void oop_oop_iterate_reverse(oop obj, OopClosureType* closure);
 121 
 122   // Bounded range iteration
< prev index next >