stefank@6982: /* stefank@6982: * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. stefank@6982: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. stefank@6982: * stefank@6982: * This code is free software; you can redistribute it and/or modify it stefank@6982: * under the terms of the GNU General Public License version 2 only, as stefank@6982: * published by the Free Software Foundation. stefank@6982: * stefank@6982: * This code is distributed in the hope that it will be useful, but WITHOUT stefank@6982: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or stefank@6982: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License stefank@6982: * version 2 for more details (a copy is included in the LICENSE file that stefank@6982: * accompanied this code). stefank@6982: * stefank@6982: * You should have received a copy of the GNU General Public License version stefank@6982: * 2 along with this work; if not, write to the Free Software Foundation, stefank@6982: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. stefank@6982: * stefank@6982: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA stefank@6982: * or visit www.oracle.com if you need additional information or have any stefank@6982: * questions. stefank@6982: * stefank@6982: */ stefank@6982: stefank@6982: #ifndef SHARE_VM_MEMORY_ITERATOR_INLINE_HPP stefank@6982: #define SHARE_VM_MEMORY_ITERATOR_INLINE_HPP stefank@6982: stefank@6982: #include "classfile/classLoaderData.hpp" stefank@6982: #include "memory/iterator.hpp" stefank@6982: #include "oops/klass.hpp" stefank@6982: #include "utilities/debug.hpp" stefank@6982: stefank@6982: inline void MetadataAwareOopClosure::do_class_loader_data(ClassLoaderData* cld) { stefank@6982: assert(_klass_closure._oop_closure == this, "Must be"); stefank@6982: stefank@6982: bool claim = true; // Must claim the class loader data before processing. stefank@6982: cld->oops_do(_klass_closure._oop_closure, &_klass_closure, claim); stefank@6982: } stefank@6982: stefank@6982: inline void MetadataAwareOopClosure::do_klass_nv(Klass* k) { stefank@6982: ClassLoaderData* cld = k->class_loader_data(); stefank@6982: do_class_loader_data(cld); stefank@6982: } stefank@6982: stefank@6982: inline void MetadataAwareOopClosure::do_klass(Klass* k) { do_klass_nv(k); } stefank@6982: stefank@6982: #endif // SHARE_VM_MEMORY_ITERATOR_INLINE_HPP