Path: blob/aarch64-shenandoah-jdk8u272-b10/hotspot/src/share/vm/oops/instanceClassLoaderKlass.hpp
32285 views
/*1* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*22*/2324#ifndef SHARE_VM_OOPS_INSTANCECLASSLOADERKLASS_HPP25#define SHARE_VM_OOPS_INSTANCECLASSLOADERKLASS_HPP2627#include "oops/instanceKlass.hpp"28#include "utilities/macros.hpp"2930// An InstanceClassLoaderKlass is a specialization of the InstanceKlass. It does31// not add any field. It is added to walk the dependencies for the class loader32// key that this class loader points to. This is how the loader_data graph is33// walked and dependant class loaders are kept alive. I thought we walked34// the list later?3536class InstanceClassLoaderKlass: public InstanceKlass {37friend class VMStructs;38friend class InstanceKlass;3940// Constructor41InstanceClassLoaderKlass(int vtable_len, int itable_len, int static_field_size, int nonstatic_oop_map_size, ReferenceType rt, AccessFlags access_flags, bool is_anonymous)42: InstanceKlass(vtable_len, itable_len, static_field_size, nonstatic_oop_map_size, rt, access_flags, is_anonymous) {}4344public:45virtual bool oop_is_instanceClassLoader() const { return true; }4647InstanceClassLoaderKlass() { assert(DumpSharedSpaces || UseSharedSpaces, "only for CDS"); }4849// Iterators50int oop_oop_iterate(oop obj, ExtendedOopClosure* blk) {51return oop_oop_iterate_v(obj, blk);52}53int oop_oop_iterate_m(oop obj, ExtendedOopClosure* blk, MemRegion mr) {54return oop_oop_iterate_v_m(obj, blk, mr);55}5657#define InstanceClassLoaderKlass_OOP_OOP_ITERATE_DECL(OopClosureType, nv_suffix) \58int oop_oop_iterate##nv_suffix(oop obj, OopClosureType* blk); \59int oop_oop_iterate##nv_suffix##_m(oop obj, OopClosureType* blk, MemRegion mr);6061ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceClassLoaderKlass_OOP_OOP_ITERATE_DECL)62ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceClassLoaderKlass_OOP_OOP_ITERATE_DECL)6364#if INCLUDE_ALL_GCS65#define InstanceClassLoaderKlass_OOP_OOP_ITERATE_BACKWARDS_DECL(OopClosureType, nv_suffix) \66int oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* blk);6768ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceClassLoaderKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)69ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceClassLoaderKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)70#endif // INCLUDE_ALL_GCS7172// Garbage collection73void oop_follow_contents(oop obj);7475// Parallel Scavenge and Parallel Old76PARALLEL_GC_DECLS77};7879#endif // SHARE_VM_OOPS_INSTANCECLASSLOADERKLASS_HPP808182