< prev index next >

src/share/vm/oops/instanceClassLoaderKlass.hpp

Print this page
rev 12851 : 8138737: Remove oop_ms_adjust_pointers and use oop_iterate instead
Reviewed-by:
rev 12852 : [mq]: 8138737-remove-oop-ms-adjust-kbarrett-rev1
   1 /*
   2  * Copyright (c) 2011, 2016, 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  *


  31 
  32 class ClassFileParser;
  33 
  34 // An InstanceClassLoaderKlass is a specialization of the InstanceKlass. It does
  35 // not add any field.  It is added to walk the dependencies for the class loader
  36 // key that this class loader points to.  This is how the loader_data graph is
  37 // walked and dependant class loaders are kept alive.  I thought we walked
  38 // the list later?
  39 
  40 class InstanceClassLoaderKlass: public InstanceKlass {
  41   friend class VMStructs;
  42   friend class InstanceKlass;
  43  private:
  44   InstanceClassLoaderKlass(const ClassFileParser& parser) : InstanceKlass(parser, InstanceKlass::_misc_kind_class_loader) {}
  45 
  46 public:
  47   InstanceClassLoaderKlass() { assert(DumpSharedSpaces || UseSharedSpaces, "only for CDS"); }
  48 
  49   // GC specific object visitors
  50   //
  51   // Mark Sweep
  52   int  oop_ms_adjust_pointers(oop obj);
  53 #if INCLUDE_ALL_GCS
  54   // Parallel Scavenge
  55   void oop_ps_push_contents(  oop obj, PSPromotionManager* pm);
  56   // Parallel Compact
  57   void oop_pc_follow_contents(oop obj, ParCompactionManager* cm);
  58   void oop_pc_update_pointers(oop obj, ParCompactionManager* cm);
  59 #endif
  60 
  61   // Oop fields (and metadata) iterators
  62   //  [nv = true]  Use non-virtual calls to do_oop_nv.
  63   //  [nv = false] Use virtual calls to do_oop.
  64   //
  65   // The InstanceClassLoaderKlass iterators also visit the CLD pointer (or mirror of anonymous klasses.)
  66 
  67  private:
  68   // Forward iteration
  69   // Iterate over the oop fields and metadata.
  70   template <bool nv, class OopClosureType>
  71   inline void oop_oop_iterate(oop obj, OopClosureType* closure);
  72 


   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  *


  31 
  32 class ClassFileParser;
  33 
  34 // An InstanceClassLoaderKlass is a specialization of the InstanceKlass. It does
  35 // not add any field.  It is added to walk the dependencies for the class loader
  36 // key that this class loader points to.  This is how the loader_data graph is
  37 // walked and dependant class loaders are kept alive.  I thought we walked
  38 // the list later?
  39 
  40 class InstanceClassLoaderKlass: public InstanceKlass {
  41   friend class VMStructs;
  42   friend class InstanceKlass;
  43  private:
  44   InstanceClassLoaderKlass(const ClassFileParser& parser) : InstanceKlass(parser, InstanceKlass::_misc_kind_class_loader) {}
  45 
  46 public:
  47   InstanceClassLoaderKlass() { assert(DumpSharedSpaces || UseSharedSpaces, "only for CDS"); }
  48 
  49   // GC specific object visitors
  50   //


  51 #if INCLUDE_ALL_GCS
  52   // Parallel Scavenge
  53   void oop_ps_push_contents(  oop obj, PSPromotionManager* pm);
  54   // Parallel Compact
  55   void oop_pc_follow_contents(oop obj, ParCompactionManager* cm);
  56   void oop_pc_update_pointers(oop obj, ParCompactionManager* cm);
  57 #endif
  58 
  59   // Oop fields (and metadata) iterators
  60   //  [nv = true]  Use non-virtual calls to do_oop_nv.
  61   //  [nv = false] Use virtual calls to do_oop.
  62   //
  63   // The InstanceClassLoaderKlass iterators also visit the CLD pointer (or mirror of anonymous klasses.)
  64 
  65  private:
  66   // Forward iteration
  67   // Iterate over the oop fields and metadata.
  68   template <bool nv, class OopClosureType>
  69   inline void oop_oop_iterate(oop obj, OopClosureType* closure);
  70 


< prev index next >