/* * Copyright (c) 2017, 2022, 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 G1CollectedHeap; class G1CMBitMap; class G1FullCollector; class G1FullGCCompactionPoint; class HeapRegion;
// Determines the regions in the heap that should be part of the compaction and // distributes them among the compaction queues in round-robin fashion. class G1DetermineCompactionQueueClosure : public HeapRegionClosure {
G1CollectedHeap* _g1h;
G1FullCollector* _collector;
uint _cur_worker;
class G1FullGCPrepareTask : public G1FullGCTask { volatilebool _has_free_compaction_targets;
HeapRegionClaimer _hrclaimer;
void set_has_free_compaction_targets();
public:
G1FullGCPrepareTask(G1FullCollector* collector); void work(uint worker_id); // After the Prepare phase, are there any unused (empty) regions (compaction // targets) at the end of any compaction queues? bool has_free_compaction_targets();
private: class G1CalculatePointersClosure : public HeapRegionClosure {
G1CollectedHeap* _g1h;
G1FullCollector* _collector;
G1CMBitMap* _bitmap;
G1FullGCCompactionPoint* _cp;
class G1ResetMetadataClosure : public HeapRegionClosure {
G1CollectedHeap* _g1h;
G1FullCollector* _collector;
void reset_region_metadata(HeapRegion* hr); // Scrub all runs of dead objects within the given region by putting filler // objects and updating the corresponding BOT. If update_bot_for_live is true, // also update the BOT for live objects. void scrub_skip_compacting_region(HeapRegion* hr, bool update_bot_for_live);
// Closure to re-prepare objects in the serial compaction point queue regions for // serial compaction. class G1SerialRePrepareClosure : public StackObj {
G1FullGCCompactionPoint* _cp;
HeapRegion* _current;
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.