src/share/vm/gc_implementation/concurrentMarkSweep/cmsOopClosures.inline.hpp

Tue, 23 Nov 2010 13:22:55 -0800

author
stefank
date
Tue, 23 Nov 2010 13:22:55 -0800
changeset 2314
f95d63e2154a
parent 1907
c18cbe5936b8
child 4037
da91efe96a93
permissions
-rw-r--r--

6989984: Use standard include model for Hospot
Summary: Replaced MakeDeps and the includeDB files with more standardized solutions.
Reviewed-by: coleenp, kvn, kamg

duke@435 1 /*
stefank@2314 2 * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
duke@435 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@435 4 *
duke@435 5 * This code is free software; you can redistribute it and/or modify it
duke@435 6 * under the terms of the GNU General Public License version 2 only, as
duke@435 7 * published by the Free Software Foundation.
duke@435 8 *
duke@435 9 * This code is distributed in the hope that it will be useful, but WITHOUT
duke@435 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@435 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@435 12 * version 2 for more details (a copy is included in the LICENSE file that
duke@435 13 * accompanied this code).
duke@435 14 *
duke@435 15 * You should have received a copy of the GNU General Public License version
duke@435 16 * 2 along with this work; if not, write to the Free Software Foundation,
duke@435 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@435 18 *
trims@1907 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@1907 20 * or visit www.oracle.com if you need additional information or have any
trims@1907 21 * questions.
duke@435 22 *
duke@435 23 */
duke@435 24
stefank@2314 25 #ifndef SHARE_VM_GC_IMPLEMENTATION_CONCURRENTMARKSWEEP_CMSOOPCLOSURES_INLINE_HPP
stefank@2314 26 #define SHARE_VM_GC_IMPLEMENTATION_CONCURRENTMARKSWEEP_CMSOOPCLOSURES_INLINE_HPP
stefank@2314 27
stefank@2314 28 #include "gc_implementation/concurrentMarkSweep/cmsOopClosures.hpp"
stefank@2314 29 #include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp"
stefank@2314 30
duke@435 31 // Trim our work_queue so its length is below max at return
duke@435 32 inline void Par_MarkRefsIntoAndScanClosure::trim_queue(uint max) {
duke@435 33 while (_work_queue->size() > max) {
duke@435 34 oop newOop;
duke@435 35 if (_work_queue->pop_local(newOop)) {
duke@435 36 assert(newOop->is_oop(), "Expected an oop");
duke@435 37 assert(_bit_map->isMarked((HeapWord*)newOop),
duke@435 38 "only grey objects on this stack");
duke@435 39 // iterate over the oops in this oop, marking and pushing
duke@435 40 // the ones in CMS heap (i.e. in _span).
duke@435 41 newOop->oop_iterate(&_par_pushAndMarkClosure);
duke@435 42 }
duke@435 43 }
duke@435 44 }
duke@435 45
jmasa@1370 46 #ifndef PRODUCT
jmasa@1370 47 void KlassRememberingOopClosure::check_remember_klasses() const {
jmasa@1370 48 assert(_should_remember_klasses == must_remember_klasses(),
jmasa@1370 49 "Should remember klasses in this context.");
jmasa@1370 50 }
jmasa@1370 51 #endif
jmasa@1370 52
jmasa@1370 53 void KlassRememberingOopClosure::remember_klass(Klass* k) {
jmasa@1370 54 if (!_revisit_stack->push(oop(k))) {
duke@435 55 fatal("Revisit stack overflow in PushOrMarkClosure");
duke@435 56 }
jmasa@1370 57 check_remember_klasses();
duke@435 58 }
duke@435 59
ysr@1376 60 inline void PushOrMarkClosure::remember_mdo(DataLayout* v) {
ysr@1376 61 // TBD
ysr@1376 62 }
ysr@1376 63
ysr@1376 64
jmasa@1370 65 void Par_KlassRememberingOopClosure::remember_klass(Klass* k) {
duke@435 66 if (!_revisit_stack->par_push(oop(k))) {
ysr@1376 67 fatal("Revisit stack overflow in Par_KlassRememberingOopClosure");
duke@435 68 }
jmasa@1370 69 check_remember_klasses();
duke@435 70 }
duke@435 71
ysr@1376 72 inline void Par_PushOrMarkClosure::remember_mdo(DataLayout* v) {
ysr@1376 73 // TBD
ysr@1376 74 }
ysr@1376 75
duke@435 76 inline void PushOrMarkClosure::do_yield_check() {
duke@435 77 _parent->do_yield_check();
duke@435 78 }
duke@435 79
duke@435 80 inline void Par_PushOrMarkClosure::do_yield_check() {
duke@435 81 _parent->do_yield_check();
duke@435 82 }
stefank@2314 83
stefank@2314 84 #endif // SHARE_VM_GC_IMPLEMENTATION_CONCURRENTMARKSWEEP_CMSOOPCLOSURES_INLINE_HPP

mercurial