/* * Copyright (c) 2014, 2021, 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 G1CardTable; class G1EvacFailureRegions; class G1EvacuationRootClosures; class G1OopStarChunkedList; class G1PLABAllocator; class HeapRegion; class PreservedMarks; class PreservedMarksSet; class outputStream;
class G1ParScanThreadState : public CHeapObj<mtGC> {
G1CollectedHeap* _g1h;
G1ScannerTasksQueue* _task_queue;
G1RedirtyCardsLocalQueueSet _rdc_local_qset;
G1CardTable* _ct;
G1EvacuationRootClosures* _closures;
G1PLABAllocator* _plab_allocator;
AgeTable _age_table; // Local tenuring threshold.
uint _tenuring_threshold;
G1ScanEvacuatedObjClosure _scanner;
uint _worker_id;
// Remember the last enqueued card to avoid enqueuing the same card over and over; // since we only ever scan a card once, this is sufficient.
size_t _last_enqueued_card;
// Upper and lower threshold to start and end work queue draining.
uint const _stack_trim_upper_threshold;
uint const _stack_trim_lower_threshold;
Tickspan _trim_ticks; // Map from young-age-index (0 == not young, 1 is youngest) to // surviving words. base is what we get back from the malloc call
size_t* _surviving_young_words_base; // this points into the array, as we use the first few entries for padding
size_t* _surviving_young_words; // Number of elements in the array above.
size_t _surviving_words_length; // Indicates whether in the last generation (old) there is no more space // available for allocation. bool _old_gen_is_full; // Size (in elements) of a partial objArray task chunk. int _partial_objarray_chunk_size;
PartialArrayTaskStepper _partial_array_stepper;
StringDedup::Requests _string_dedup_requests;
G1NUMA* _numa; // Records how many object allocations happened at each node during copy to survivor. // Only starts recording when log of gc+heap+numa is enabled and its data is // transferred when flushed.
size_t* _obj_alloc_stat;
// Per-thread evacuation failure data structures.
EVAC_FAILURE_INJECTOR_ONLY(size_t _evac_failure_inject_counter;)
// Apply the post barrier to the given reference field. Enqueues the card of p // if the barrier does not filter out the reference for some reason (e.g. // p and q are in the same region, p is in survivor, p is in collection set) // To be called during GC if nothing particular about p and obj are known. template <class T> void write_ref_field_post(T* p, oop obj);
// Enqueue the card if the reference's target region's remembered set is tracked. // Assumes that a significant amount of pre-filtering (like done by // write_ref_field_post() above) has already been performed. template <class T> void enqueue_card_if_tracked(G1HeapRegionAttr region_attr, T* p, oop o);
// Pass locally gathered statistics to global state. Returns the total number of // HeapWords copied.
size_t flush_stats(size_t* surviving_young_words, uint num_workers);
// This method is applied to the fields of the objects that have just been copied. template <class T> void do_oop_evac(T* p);
void dispatch_task(ScannerTask task);
// Tries to allocate word_sz in the PLAB of the next "generation" after trying to // allocate into dest. Previous_plab_refill_failed indicates whether previous // PLAB refill for the original (source) object failed. // Returns a non-NULL pointer if successful, and updates dest if required. // Also determines whether we should continue to try to allocate into the various // generations or just end trying to allocate.
HeapWord* allocate_in_next_plab(G1HeapRegionAttr* dest,
size_t word_sz, bool previous_plab_refill_failed,
uint node_index);
inline G1HeapRegionAttr next_region_attr(G1HeapRegionAttr const region_attr, markWord const m, uint& age);
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.