/* * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. *
*/
class HeapRegion; class G1CollectedHeap; class G1RemSet; class G1ConcurrentMark; class DirtyCardToOopClosure; class G1CMBitMap; class G1ParScanThreadState; class G1ScanEvacuatedObjClosure; class G1CMTask; class ReferenceProcessor;
class G1ScanClosureBase : public BasicOopIterateClosure { protected:
G1CollectedHeap* _g1h;
G1ParScanThreadState* _par_scan_state;
// Used to scan cards from the DCQS or the remembered sets during garbage collection. class G1ScanCardClosure : public G1ScanClosureBase {
size_t& _heap_roots_found; public:
G1ScanCardClosure(G1CollectedHeap* g1h,
G1ParScanThreadState* pss,
size_t& heap_roots_found) :
G1ScanClosureBase(g1h, pss), _heap_roots_found(heap_roots_found) { }
// Used during Optional RS scanning to make sure we trim the queues in a timely manner. class G1ScanRSForOptionalClosure : public OopClosure {
G1CollectedHeap* _g1h;
G1ScanCardClosure* _scan_cl; public:
G1ScanRSForOptionalClosure(G1CollectedHeap* g1h, G1ScanCardClosure* cl) : _g1h(g1h), _scan_cl(cl) { }
// This closure is applied to the fields of the objects that have just been copied during evacuation. class G1ScanEvacuatedObjClosure : public G1ScanClosureBase { friendclass G1SkipCardEnqueueSetter;
// We need to do reference discovery while processing evacuated objects. virtual ReferenceIterationMode reference_iteration_mode() { return DO_DISCOVERED_AND_DISCOVERY; }
// RAII object to properly set the _skip_card_enqueue field in G1ScanEvacuatedObjClosure. class G1SkipCardEnqueueSetter : public StackObj {
G1ScanEvacuatedObjClosure* _closure;
// Add back base class for metadata class G1ParCopyHelper : public OopClosure { protected:
G1CollectedHeap* _g1h;
G1ParScanThreadState* _par_scan_state;
uint _worker_id; // Cache value from par_scan_state.
ClassLoaderData* _scanned_cld;
G1ConcurrentMark* _cm;
// Mark the object if it's not already marked. This is used to mark // objects pointed to by roots that are guaranteed not to move // during the GC (i.e., non-CSet objects). It is MT-safe. inlinevoid mark_object(oop obj);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.