src/hotspot/share/gc/g1/g1ConcurrentRefine.hpp
author chegar
Thu, 17 Oct 2019 20:54:25 +0100
branchdatagramsocketimpl-branch
changeset 58679 9c3209ff7550
parent 58678 9cf78a70fa4f
parent 58508 d6058bd73982
permissions -rw-r--r--
datagramsocketimpl-branch: merge with default
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1374
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
     1
/*
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 49392
diff changeset
     2
 * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved.
1374
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
     4
 *
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
     7
 * published by the Free Software Foundation.
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
     8
 *
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    13
 * accompanied this code).
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    14
 *
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    18
 *
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 5033
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 5033
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 5033
diff changeset
    21
 * questions.
1374
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    22
 *
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    23
 */
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    24
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 49392
diff changeset
    25
#ifndef SHARE_GC_G1_G1CONCURRENTREFINE_HPP
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 49392
diff changeset
    26
#define SHARE_GC_G1_G1CONCURRENTREFINE_HPP
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6247
diff changeset
    27
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6247
diff changeset
    28
#include "memory/allocation.hpp"
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6247
diff changeset
    29
#include "utilities/globalDefinitions.hpp"
58508
d6058bd73982 8231153: Improve concurrent refinement statistics
kbarrett
parents: 57953
diff changeset
    30
#include "utilities/ticks.hpp"
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6247
diff changeset
    31
1374
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    32
// Forward decl
48103
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    33
class G1ConcurrentRefine;
47789
a77a7d3bc4f6 8149127: Rename g1/concurrentMarkThread.* to g1/g1ConcurrentMarkThread.*
tschatzl
parents: 47216
diff changeset
    34
class G1ConcurrentRefineThread;
38172
90f405aac699 8155524: HotCardCache shouldn't be part of ConcurrentG1Refine
kbarrett
parents: 37510
diff changeset
    35
class outputStream;
90f405aac699 8155524: HotCardCache shouldn't be part of ConcurrentG1Refine
kbarrett
parents: 37510
diff changeset
    36
class ThreadClosure;
1374
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
    37
48103
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    38
// Helper class for refinement thread management. Used to start, stop and
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    39
// iterate over them.
49392
2956d0ece7a9 8199282: Remove ValueObj class for allocation subclassing for gc code
coleenp
parents: 48103
diff changeset
    40
class G1ConcurrentRefineThreadControl {
48103
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    41
  G1ConcurrentRefine* _cr;
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    42
47789
a77a7d3bc4f6 8149127: Rename g1/concurrentMarkThread.* to g1/g1ConcurrentMarkThread.*
tschatzl
parents: 47216
diff changeset
    43
  G1ConcurrentRefineThread** _threads;
48103
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    44
  uint _num_max_threads;
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    45
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    46
  // Create the refinement thread for the given worker id.
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    47
  // If initializing is true, ignore InjectGCWorkerCreationFailure.
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    48
  G1ConcurrentRefineThread* create_refinement_thread(uint worker_id, bool initializing);
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    49
public:
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    50
  G1ConcurrentRefineThreadControl();
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    51
  ~G1ConcurrentRefineThreadControl();
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    52
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    53
  jint initialize(G1ConcurrentRefine* cr, uint num_max_threads);
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    54
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    55
  // If there is a "successor" thread that can be activated given the current id,
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    56
  // activate it.
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    57
  void maybe_activate_next(uint cur_worker_id);
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    58
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    59
  void print_on(outputStream* st) const;
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    60
  void worker_threads_do(ThreadClosure* tc);
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    61
  void stop();
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    62
};
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    63
57953
d78c910f9069 8230109: G1DirtyCardQueueSet should use card counts rather than buffer counts
kbarrett
parents: 55510
diff changeset
    64
// Controls refinement threads and their activation based on the number of
d78c910f9069 8230109: G1DirtyCardQueueSet should use card counts rather than buffer counts
kbarrett
parents: 55510
diff changeset
    65
// cards currently available in the global dirty card queue.
d78c910f9069 8230109: G1DirtyCardQueueSet should use card counts rather than buffer counts
kbarrett
parents: 55510
diff changeset
    66
// Refinement threads obtain work from the queue (a buffer at a time) based
d78c910f9069 8230109: G1DirtyCardQueueSet should use card counts rather than buffer counts
kbarrett
parents: 55510
diff changeset
    67
// on these thresholds. They are activated gradually based on the amount of
d78c910f9069 8230109: G1DirtyCardQueueSet should use card counts rather than buffer counts
kbarrett
parents: 55510
diff changeset
    68
// work to do.
48103
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    69
// Refinement thread n activates thread n+1 if the instance of this class determines there
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    70
// is enough work available. Threads deactivate themselves if the current amount of
57953
d78c910f9069 8230109: G1DirtyCardQueueSet should use card counts rather than buffer counts
kbarrett
parents: 55510
diff changeset
    71
// available cards falls below their individual threshold.
48103
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    72
class G1ConcurrentRefine : public CHeapObj<mtGC> {
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    73
  G1ConcurrentRefineThreadControl _thread_control;
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    74
  /*
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    75
   * The value of the completed dirty card queue length falls into one of 3 zones:
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    76
   * green, yellow, red. If the value is in [0, green) nothing is
57953
d78c910f9069 8230109: G1DirtyCardQueueSet should use card counts rather than buffer counts
kbarrett
parents: 55510
diff changeset
    77
   * done, the buffered cards are left unprocessed to enable the caching effect of the
48103
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    78
   * dirtied cards. In the yellow zone [green, yellow) the concurrent refinement
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    79
   * threads are gradually activated. In [yellow, red) all threads are
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    80
   * running. If the length becomes red (max queue length) the mutators start
57953
d78c910f9069 8230109: G1DirtyCardQueueSet should use card counts rather than buffer counts
kbarrett
parents: 55510
diff changeset
    81
   * processing cards too.
48103
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    82
   *
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    83
   * There are some interesting cases (when G1UseAdaptiveConcRefinement
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    84
   * is turned off):
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    85
   * 1) green = yellow = red = 0. In this case the mutator will process all
57953
d78c910f9069 8230109: G1DirtyCardQueueSet should use card counts rather than buffer counts
kbarrett
parents: 55510
diff changeset
    86
   *    cards. Except for those that are created by the deferred updates
48103
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    87
   *    machinery during a collection.
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    88
   * 2) green = 0. Means no caching. Can be a good way to minimize the
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    89
   *    amount of time spent updating remembered sets during a collection.
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
    90
   */
36371
fd81a4f0ea00 8139651: ConcurrentG1Refine uses ints for many of its members that should be unsigned types
jprovino
parents: 33608
diff changeset
    91
  size_t _green_zone;
fd81a4f0ea00 8139651: ConcurrentG1Refine uses ints for many of its members that should be unsigned types
jprovino
parents: 33608
diff changeset
    92
  size_t _yellow_zone;
fd81a4f0ea00 8139651: ConcurrentG1Refine uses ints for many of its members that should be unsigned types
jprovino
parents: 33608
diff changeset
    93
  size_t _red_zone;
37510
cf066fe4531b 8133051: Concurrent refinement threads may be activated and deactivated at random
kbarrett
parents: 37158
diff changeset
    94
  size_t _min_yellow_zone_size;
37158
b882bbfa1af0 8152101: Move G1 concurrent refinement adjustment code out of G1CollectorPolicy
mgerdin
parents: 36371
diff changeset
    95
47789
a77a7d3bc4f6 8149127: Rename g1/concurrentMarkThread.* to g1/g1ConcurrentMarkThread.*
tschatzl
parents: 47216
diff changeset
    96
  G1ConcurrentRefine(size_t green_zone,
37510
cf066fe4531b 8133051: Concurrent refinement threads may be activated and deactivated at random
kbarrett
parents: 37158
diff changeset
    97
                     size_t yellow_zone,
cf066fe4531b 8133051: Concurrent refinement threads may be activated and deactivated at random
kbarrett
parents: 37158
diff changeset
    98
                     size_t red_zone,
cf066fe4531b 8133051: Concurrent refinement threads may be activated and deactivated at random
kbarrett
parents: 37158
diff changeset
    99
                     size_t min_yellow_zone_size);
3590
a268fa66d7fb 6819077: G1: first GC thread coming late into the GC.
johnc
parents: 3589
diff changeset
   100
37510
cf066fe4531b 8133051: Concurrent refinement threads may be activated and deactivated at random
kbarrett
parents: 37158
diff changeset
   101
  // Update green/yellow/red zone values based on how well goals are being met.
57953
d78c910f9069 8230109: G1DirtyCardQueueSet should use card counts rather than buffer counts
kbarrett
parents: 55510
diff changeset
   102
  void update_zones(double logged_cards_scan_time,
d78c910f9069 8230109: G1DirtyCardQueueSet should use card counts rather than buffer counts
kbarrett
parents: 55510
diff changeset
   103
                    size_t processed_logged_cards,
37510
cf066fe4531b 8133051: Concurrent refinement threads may be activated and deactivated at random
kbarrett
parents: 37158
diff changeset
   104
                    double goal_ms);
cf066fe4531b 8133051: Concurrent refinement threads may be activated and deactivated at random
kbarrett
parents: 37158
diff changeset
   105
48103
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
   106
  static uint worker_id_offset();
57953
d78c910f9069 8230109: G1DirtyCardQueueSet should use card counts rather than buffer counts
kbarrett
parents: 55510
diff changeset
   107
  void maybe_activate_more_threads(uint worker_id, size_t num_cur_cards);
32738
a1adf25202fd 8135025: Error message is repeated for large value at G1ConcRefinementThreads
sangheki
parents: 30764
diff changeset
   108
48103
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
   109
  jint initialize();
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
   110
public:
47789
a77a7d3bc4f6 8149127: Rename g1/concurrentMarkThread.* to g1/g1ConcurrentMarkThread.*
tschatzl
parents: 47216
diff changeset
   111
  ~G1ConcurrentRefine();
1374
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   112
48103
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
   113
  // Returns a G1ConcurrentRefine instance if succeeded to create/initialize the
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
   114
  // G1ConcurrentRefine instance. Otherwise, returns NULL with error code.
47789
a77a7d3bc4f6 8149127: Rename g1/concurrentMarkThread.* to g1/g1ConcurrentMarkThread.*
tschatzl
parents: 47216
diff changeset
   115
  static G1ConcurrentRefine* create(jint* ecode);
32738
a1adf25202fd 8135025: Error message is repeated for large value at G1ConcRefinementThreads
sangheki
parents: 30764
diff changeset
   116
2881
74a1337e4acc 6484957: G1: parallel concurrent refinement
iveresov
parents: 2105
diff changeset
   117
  void stop();
1374
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   118
48103
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
   119
  // Adjust refinement thresholds based on work done during the pause and the goal time.
57953
d78c910f9069 8230109: G1DirtyCardQueueSet should use card counts rather than buffer counts
kbarrett
parents: 55510
diff changeset
   120
  void adjust(double logged_cards_scan_time, size_t processed_logged_cards, double goal_ms);
4481
de92ec484f5e 6862387: tune concurrent refinement further
iveresov
parents: 4022
diff changeset
   121
58508
d6058bd73982 8231153: Improve concurrent refinement statistics
kbarrett
parents: 57953
diff changeset
   122
  struct RefinementStats {
d6058bd73982 8231153: Improve concurrent refinement statistics
kbarrett
parents: 57953
diff changeset
   123
    Tickspan _time;
d6058bd73982 8231153: Improve concurrent refinement statistics
kbarrett
parents: 57953
diff changeset
   124
    size_t _cards;
d6058bd73982 8231153: Improve concurrent refinement statistics
kbarrett
parents: 57953
diff changeset
   125
    RefinementStats(Tickspan time, size_t cards) : _time(time), _cards(cards) {}
d6058bd73982 8231153: Improve concurrent refinement statistics
kbarrett
parents: 57953
diff changeset
   126
  };
d6058bd73982 8231153: Improve concurrent refinement statistics
kbarrett
parents: 57953
diff changeset
   127
d6058bd73982 8231153: Improve concurrent refinement statistics
kbarrett
parents: 57953
diff changeset
   128
  RefinementStats total_refinement_stats() const;
d6058bd73982 8231153: Improve concurrent refinement statistics
kbarrett
parents: 57953
diff changeset
   129
57953
d78c910f9069 8230109: G1DirtyCardQueueSet should use card counts rather than buffer counts
kbarrett
parents: 55510
diff changeset
   130
  // Cards in the dirty card queue set.
48103
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
   131
  size_t activation_threshold(uint worker_id) const;
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
   132
  size_t deactivation_threshold(uint worker_id) const;
58508
d6058bd73982 8231153: Improve concurrent refinement statistics
kbarrett
parents: 57953
diff changeset
   133
d6058bd73982 8231153: Improve concurrent refinement statistics
kbarrett
parents: 57953
diff changeset
   134
  // Perform a single refinement step; called by the refinement
d6058bd73982 8231153: Improve concurrent refinement statistics
kbarrett
parents: 57953
diff changeset
   135
  // threads.  Returns true if there was refinement work available.
d6058bd73982 8231153: Improve concurrent refinement statistics
kbarrett
parents: 57953
diff changeset
   136
  // Increments *total_refined_cards.
d6058bd73982 8231153: Improve concurrent refinement statistics
kbarrett
parents: 57953
diff changeset
   137
  bool do_refinement_step(uint worker_id, size_t* total_refined_cards);
48103
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
   138
47790
4925ee84b4ac 8140255: Move the management of G1YoungRemSetSamplingThread from G1ConcurrentRefine
tschatzl
parents: 47789
diff changeset
   139
  // Iterate over all concurrent refinement threads applying the given closure.
2881
74a1337e4acc 6484957: G1: parallel concurrent refinement
iveresov
parents: 2105
diff changeset
   140
  void threads_do(ThreadClosure *tc);
1374
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   141
48103
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
   142
  // Maximum number of refinement threads.
26dbe08d1c17 8190426: Lazily initialize refinement threads with UseDynamicNumberOfGCThreads
tschatzl
parents: 47790
diff changeset
   143
  static uint max_num_threads();
4022
2ec87d5043f7 6885041: G1: inconsistent thread dump
tonyp
parents: 3590
diff changeset
   144
47790
4925ee84b4ac 8140255: Move the management of G1YoungRemSetSamplingThread from G1ConcurrentRefine
tschatzl
parents: 47789
diff changeset
   145
  void print_threads_on(outputStream* st) const;
4481
de92ec484f5e 6862387: tune concurrent refinement further
iveresov
parents: 4022
diff changeset
   146
57953
d78c910f9069 8230109: G1DirtyCardQueueSet should use card counts rather than buffer counts
kbarrett
parents: 55510
diff changeset
   147
  // Cards in the dirty card queue set.
36371
fd81a4f0ea00 8139651: ConcurrentG1Refine uses ints for many of its members that should be unsigned types
jprovino
parents: 33608
diff changeset
   148
  size_t green_zone() const      { return _green_zone;  }
fd81a4f0ea00 8139651: ConcurrentG1Refine uses ints for many of its members that should be unsigned types
jprovino
parents: 33608
diff changeset
   149
  size_t yellow_zone() const     { return _yellow_zone; }
fd81a4f0ea00 8139651: ConcurrentG1Refine uses ints for many of its members that should be unsigned types
jprovino
parents: 33608
diff changeset
   150
  size_t red_zone() const        { return _red_zone;    }
1374
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents:
diff changeset
   151
};
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 6247
diff changeset
   152
53244
9807daeb47c4 8216167: Update include guards to reflect correct directories
coleenp
parents: 49392
diff changeset
   153
#endif // SHARE_GC_G1_G1CONCURRENTREFINE_HPP