src/share/vm/oops/instanceClassLoaderKlass.hpp

Wed, 23 Jan 2013 13:02:39 -0500

author
jprovino
date
Wed, 23 Jan 2013 13:02:39 -0500
changeset 4542
db9981fd3124
parent 4047
aed758eda82a
child 6198
55fb97c4c58d
permissions
-rw-r--r--

8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
Summary: Rename INCLUDE_ALTERNATE_GCS to INCLUDE_ALL_GCS and replace SERIALGC with INCLUDE_ALL_GCS.
Reviewed-by: coleenp, stefank

coleenp@4037 1 /*
coleenp@4037 2 * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
coleenp@4037 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
coleenp@4037 4 *
coleenp@4037 5 * This code is free software; you can redistribute it and/or modify it
coleenp@4037 6 * under the terms of the GNU General Public License version 2 only, as
coleenp@4037 7 * published by the Free Software Foundation.
coleenp@4037 8 *
coleenp@4037 9 * This code is distributed in the hope that it will be useful, but WITHOUT
coleenp@4037 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
coleenp@4037 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
coleenp@4037 12 * version 2 for more details (a copy is included in the LICENSE file that
coleenp@4037 13 * accompanied this code).
coleenp@4037 14 *
coleenp@4037 15 * You should have received a copy of the GNU General Public License version
coleenp@4037 16 * 2 along with this work; if not, write to the Free Software Foundation,
coleenp@4037 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
coleenp@4037 18 *
coleenp@4037 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
coleenp@4037 20 * or visit www.oracle.com if you need additional information or have any
coleenp@4037 21 * questions.
coleenp@4037 22 *
coleenp@4037 23 */
coleenp@4037 24
coleenp@4037 25 #ifndef SHARE_VM_OOPS_INSTANCECLASSLOADERKLASS_HPP
coleenp@4037 26 #define SHARE_VM_OOPS_INSTANCECLASSLOADERKLASS_HPP
coleenp@4037 27
coleenp@4037 28 #include "oops/instanceKlass.hpp"
jprovino@4542 29 #include "utilities/macros.hpp"
coleenp@4037 30
coleenp@4047 31 // An InstanceClassLoaderKlass is a specialization of the InstanceKlass. It does
coleenp@4037 32 // not add any field. It is added to walk the dependencies for the class loader
coleenp@4037 33 // key that this class loader points to. This is how the loader_data graph is
coleenp@4037 34 // walked and dependant class loaders are kept alive. I thought we walked
coleenp@4037 35 // the list later?
coleenp@4037 36
coleenp@4047 37 class InstanceClassLoaderKlass: public InstanceKlass {
coleenp@4037 38 friend class VMStructs;
coleenp@4037 39 friend class InstanceKlass;
coleenp@4037 40
coleenp@4037 41 // Constructor
coleenp@4047 42 InstanceClassLoaderKlass(int vtable_len, int itable_len, int static_field_size, int nonstatic_oop_map_size, ReferenceType rt, AccessFlags access_flags, bool is_anonymous)
coleenp@4037 43 : InstanceKlass(vtable_len, itable_len, static_field_size, nonstatic_oop_map_size, rt, access_flags, is_anonymous) {}
coleenp@4037 44
coleenp@4037 45 public:
coleenp@4037 46 virtual bool oop_is_instanceClassLoader() const { return true; }
coleenp@4037 47
coleenp@4047 48 InstanceClassLoaderKlass() { assert(DumpSharedSpaces || UseSharedSpaces, "only for CDS"); }
coleenp@4037 49
coleenp@4037 50 // Iterators
coleenp@4037 51 int oop_oop_iterate(oop obj, ExtendedOopClosure* blk) {
coleenp@4037 52 return oop_oop_iterate_v(obj, blk);
coleenp@4037 53 }
coleenp@4037 54 int oop_oop_iterate_m(oop obj, ExtendedOopClosure* blk, MemRegion mr) {
coleenp@4037 55 return oop_oop_iterate_v_m(obj, blk, mr);
coleenp@4037 56 }
coleenp@4037 57
coleenp@4037 58 #define InstanceClassLoaderKlass_OOP_OOP_ITERATE_DECL(OopClosureType, nv_suffix) \
coleenp@4037 59 int oop_oop_iterate##nv_suffix(oop obj, OopClosureType* blk); \
coleenp@4037 60 int oop_oop_iterate##nv_suffix##_m(oop obj, OopClosureType* blk, MemRegion mr);
coleenp@4037 61
coleenp@4037 62 ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceClassLoaderKlass_OOP_OOP_ITERATE_DECL)
coleenp@4037 63 ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceClassLoaderKlass_OOP_OOP_ITERATE_DECL)
coleenp@4037 64
jprovino@4542 65 #if INCLUDE_ALL_GCS
coleenp@4037 66 #define InstanceClassLoaderKlass_OOP_OOP_ITERATE_BACKWARDS_DECL(OopClosureType, nv_suffix) \
coleenp@4037 67 int oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* blk);
coleenp@4037 68
coleenp@4037 69 ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceClassLoaderKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
coleenp@4037 70 ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceClassLoaderKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
jprovino@4542 71 #endif // INCLUDE_ALL_GCS
coleenp@4037 72
coleenp@4037 73 // Garbage collection
coleenp@4037 74 void oop_follow_contents(oop obj);
coleenp@4037 75
coleenp@4037 76 // Parallel Scavenge and Parallel Old
coleenp@4037 77 PARALLEL_GC_DECLS
coleenp@4037 78 };
coleenp@4037 79
coleenp@4037 80 #endif // SHARE_VM_OOPS_INSTANCECLASSLOADERKLASS_HPP

mercurial