src/hotspot/share/gc/g1/g1SATBMarkQueueSet.cpp
changeset 54006 a421bdf22394
parent 52726 9cfa2e273b77
child 55498 e64383344f14
child 58678 9cf78a70fa4f
equal deleted inserted replaced
54005:6ffb8d7fe1e4 54006:a421bdf22394
     1 /*
     1 /*
     2  * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    36 
    36 
    37 void G1SATBMarkQueueSet::initialize(G1CollectedHeap* g1h,
    37 void G1SATBMarkQueueSet::initialize(G1CollectedHeap* g1h,
    38                                     Monitor* cbl_mon,
    38                                     Monitor* cbl_mon,
    39                                     BufferNode::Allocator* allocator,
    39                                     BufferNode::Allocator* allocator,
    40                                     size_t process_completed_buffers_threshold,
    40                                     size_t process_completed_buffers_threshold,
    41                                     uint buffer_enqueue_threshold_percentage,
    41                                     uint buffer_enqueue_threshold_percentage) {
    42                                     Mutex* lock) {
       
    43   SATBMarkQueueSet::initialize(cbl_mon,
    42   SATBMarkQueueSet::initialize(cbl_mon,
    44                                allocator,
    43                                allocator,
    45                                process_completed_buffers_threshold,
    44                                process_completed_buffers_threshold,
    46                                buffer_enqueue_threshold_percentage,
    45                                buffer_enqueue_threshold_percentage);
    47                                lock);
       
    48   _g1h = g1h;
    46   _g1h = g1h;
    49 }
    47 }
    50 
    48 
    51 void G1SATBMarkQueueSet::handle_zero_index_for_thread(JavaThread* t) {
    49 void G1SATBMarkQueueSet::handle_zero_index_for_thread(Thread* t) {
    52   G1ThreadLocalData::satb_mark_queue(t).handle_zero_index();
    50   G1ThreadLocalData::satb_mark_queue(t).handle_zero_index();
    53 }
    51 }
    54 
    52 
    55 SATBMarkQueue& G1SATBMarkQueueSet::satb_queue_for_thread(JavaThread* const t) const{
    53 SATBMarkQueue& G1SATBMarkQueueSet::satb_queue_for_thread(Thread* const t) const{
    56   return G1ThreadLocalData::satb_mark_queue(t);
    54   return G1ThreadLocalData::satb_mark_queue(t);
    57 }
    55 }
    58 
    56 
    59 // Return true if a SATB buffer entry refers to an object that
    57 // Return true if a SATB buffer entry refers to an object that
    60 // requires marking.
    58 // requires marking.