hotspot/src/share/vm/gc_implementation/g1/g1HotCardCache.cpp
author jlaskey
Tue, 23 Jul 2013 12:00:29 -0300
changeset 19089 51cfdcf21d35
parent 17327 4bd0581aa231
child 23855 c4574075402c
permissions -rw-r--r--
8021130: Comments need to be tokens Reviewed-by: lagergren, attila Contributed-by: james.laskey@oracle.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
17327
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
     1
/*
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
     2
 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
     4
 *
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
     7
 * published by the Free Software Foundation.
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
     8
 *
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    13
 * accompanied this code).
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    14
 *
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    18
 *
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    21
 * questions.
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    22
 *
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    23
 */
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    24
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    25
#include "precompiled.hpp"
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    26
#include "gc_implementation/g1/dirtyCardQueue.hpp"
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    27
#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    28
#include "gc_implementation/g1/g1HotCardCache.hpp"
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    29
#include "gc_implementation/g1/g1RemSet.hpp"
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    30
#include "gc_implementation/g1/heapRegion.hpp"
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    31
#include "runtime/atomic.hpp"
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    32
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    33
G1HotCardCache::G1HotCardCache(G1CollectedHeap *g1h):
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    34
  _g1h(g1h), _hot_cache(NULL), _use_cache(false), _card_counts(g1h) {}
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    35
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    36
void G1HotCardCache::initialize() {
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    37
  if (default_use_cache()) {
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    38
    _use_cache = true;
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    39
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    40
    _hot_cache_size = (1 << G1ConcRSLogCacheSize);
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    41
    _hot_cache = NEW_C_HEAP_ARRAY(jbyte*, _hot_cache_size, mtGC);
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    42
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    43
    _n_hot = 0;
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    44
    _hot_cache_idx = 0;
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    45
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    46
    // For refining the cards in the hot cache in parallel
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    47
    int n_workers = (ParallelGCThreads > 0 ?
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    48
                        _g1h->workers()->total_workers() : 1);
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    49
    _hot_cache_par_chunk_size = MAX2(1, _hot_cache_size / n_workers);
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    50
    _hot_cache_par_claimed_idx = 0;
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    51
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    52
    _card_counts.initialize();
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    53
  }
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    54
}
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    55
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    56
G1HotCardCache::~G1HotCardCache() {
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    57
  if (default_use_cache()) {
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    58
    assert(_hot_cache != NULL, "Logic");
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    59
    FREE_C_HEAP_ARRAY(jbyte*, _hot_cache, mtGC);
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    60
  }
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    61
}
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    62
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    63
jbyte* G1HotCardCache::insert(jbyte* card_ptr) {
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    64
  uint count = _card_counts.add_card_count(card_ptr);
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    65
  if (!_card_counts.is_hot(count)) {
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    66
    // The card is not hot so do not store it in the cache;
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    67
    // return it for immediate refining.
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    68
    return card_ptr;
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    69
  }
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    70
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    71
  // Otherwise, the card is hot.
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    72
  jbyte* res = NULL;
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    73
  MutexLockerEx x(HotCardCache_lock, Mutex::_no_safepoint_check_flag);
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    74
  if (_n_hot == _hot_cache_size) {
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    75
    res = _hot_cache[_hot_cache_idx];
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    76
    _n_hot--;
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    77
  }
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    78
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    79
  // Now _n_hot < _hot_cache_size, and we can insert at _hot_cache_idx.
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    80
  _hot_cache[_hot_cache_idx] = card_ptr;
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    81
  _hot_cache_idx++;
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    82
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    83
  if (_hot_cache_idx == _hot_cache_size) {
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    84
    // Wrap around
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    85
    _hot_cache_idx = 0;
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    86
  }
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    87
  _n_hot++;
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    88
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    89
  return res;
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    90
}
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    91
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    92
void G1HotCardCache::drain(int worker_i,
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    93
                           G1RemSet* g1rs,
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    94
                           DirtyCardQueue* into_cset_dcq) {
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    95
  if (!default_use_cache()) {
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    96
    assert(_hot_cache == NULL, "Logic");
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    97
    return;
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    98
  }
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
    99
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   100
  assert(_hot_cache != NULL, "Logic");
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   101
  assert(!use_cache(), "cache should be disabled");
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   102
  int start_idx;
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   103
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   104
  while ((start_idx = _hot_cache_par_claimed_idx) < _n_hot) { // read once
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   105
    int end_idx = start_idx + _hot_cache_par_chunk_size;
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   106
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   107
    if (start_idx ==
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   108
        Atomic::cmpxchg(end_idx, &_hot_cache_par_claimed_idx, start_idx)) {
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   109
      // The current worker has successfully claimed the chunk [start_idx..end_idx)
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   110
      end_idx = MIN2(end_idx, _n_hot);
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   111
      for (int i = start_idx; i < end_idx; i++) {
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   112
        jbyte* card_ptr = _hot_cache[i];
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   113
        if (card_ptr != NULL) {
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   114
          if (g1rs->refine_card(card_ptr, worker_i, true)) {
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   115
            // The part of the heap spanned by the card contains references
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   116
            // that point into the current collection set.
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   117
            // We need to record the card pointer in the DirtyCardQueueSet
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   118
            // that we use for such cards.
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   119
            //
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   120
            // The only time we care about recording cards that contain
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   121
            // references that point into the collection set is during
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   122
            // RSet updating while within an evacuation pause.
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   123
            // In this case worker_i should be the id of a GC worker thread
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   124
            assert(SafepointSynchronize::is_at_safepoint(), "Should be at a safepoint");
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   125
            assert(worker_i < (int) (ParallelGCThreads == 0 ? 1 : ParallelGCThreads),
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   126
                   err_msg("incorrect worker id: "INT32_FORMAT, worker_i));
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   127
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   128
            into_cset_dcq->enqueue(card_ptr);
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   129
          }
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   130
        }
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   131
      }
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   132
    }
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   133
  }
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   134
  // The existing entries in the hot card cache, which were just refined
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   135
  // above, are discarded prior to re-enabling the cache near the end of the GC.
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   136
}
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   137
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   138
void G1HotCardCache::resize_card_counts(size_t heap_capacity) {
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   139
  _card_counts.resize(heap_capacity);
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   140
}
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   141
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   142
void G1HotCardCache::reset_card_counts(HeapRegion* hr) {
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   143
  _card_counts.clear_region(hr);
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   144
}
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   145
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   146
void G1HotCardCache::reset_card_counts() {
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   147
  _card_counts.clear_all();
4bd0581aa231 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
   148
}