annotate src/share/vm/gc_implementation/g1/g1CardCounts.cpp @ 20543:e7d0505c8a30

8059758: Footprint regressions with JDK-8038423 Summary: Changes in JDK-8038423 always initialize (zero out) virtual memory used for auxiliary data structures. This causes a footprint regression for G1 in startup benchmarks. This is because they do not touch that memory at all, so the operating system does not actually commit these pages. The fix is to, if the initialization value of the data structures matches the default value of just committed memory (=0), do not do anything. Reviewed-by: jwilhelm, brutisso
author tschatzl
date Fri, 10 Oct 2014 15:51:58 +0200
parents 1f1d373cd044
children 7848fc12602b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10246
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
1 /*
17937
78bbf4d43a14 8037816: Fix for 8036122 breaks build with Xcode5/clang
drchase
parents: 12343
diff changeset
2 * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
10246
194f52aa2f23 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.
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
4 *
194f52aa2f23 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
194f52aa2f23 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
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
7 * published by the Free Software Foundation.
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
8 *
194f52aa2f23 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
194f52aa2f23 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
194f52aa2f23 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
194f52aa2f23 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
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
13 * accompanied this code).
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
14 *
194f52aa2f23 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
194f52aa2f23 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,
194f52aa2f23 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.
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
18 *
194f52aa2f23 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
194f52aa2f23 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
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
21 * questions.
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
22 *
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
23 */
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
24
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
25 #include "precompiled.hpp"
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
26 #include "gc_implementation/g1/g1CardCounts.hpp"
194f52aa2f23 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"
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
28 #include "gc_implementation/g1/g1CollectorPolicy.hpp"
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
29 #include "gc_implementation/g1/g1GCPhaseTimes.hpp"
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
30 #include "memory/cardTableModRefBS.hpp"
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
31 #include "services/memTracker.hpp"
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
32 #include "utilities/copy.hpp"
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
33
17937
78bbf4d43a14 8037816: Fix for 8036122 breaks build with Xcode5/clang
drchase
parents: 12343
diff changeset
34 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
78bbf4d43a14 8037816: Fix for 8036122 breaks build with Xcode5/clang
drchase
parents: 12343
diff changeset
35
20543
e7d0505c8a30 8059758: Footprint regressions with JDK-8038423
tschatzl
parents: 20337
diff changeset
36 void G1CardCountsMappingChangedListener::on_commit(uint start_idx, size_t num_regions, bool zero_filled) {
e7d0505c8a30 8059758: Footprint regressions with JDK-8038423
tschatzl
parents: 20337
diff changeset
37 if (zero_filled) {
e7d0505c8a30 8059758: Footprint regressions with JDK-8038423
tschatzl
parents: 20337
diff changeset
38 return;
e7d0505c8a30 8059758: Footprint regressions with JDK-8038423
tschatzl
parents: 20337
diff changeset
39 }
20337
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
40 MemRegion mr(G1CollectedHeap::heap()->bottom_addr_for_region(start_idx), num_regions * HeapRegion::GrainWords);
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
41 _counts->clear_range(mr);
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
42 }
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
43
10246
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
44 void G1CardCounts::clear_range(size_t from_card_num, size_t to_card_num) {
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
45 if (has_count_table()) {
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
46 assert(from_card_num < to_card_num,
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
47 err_msg("Wrong order? from: " SIZE_FORMAT ", to: "SIZE_FORMAT,
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
48 from_card_num, to_card_num));
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
49 Copy::fill_to_bytes(&_card_counts[from_card_num], (to_card_num - from_card_num));
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
50 }
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
51 }
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
52
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
53 G1CardCounts::G1CardCounts(G1CollectedHeap *g1h):
20337
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
54 _listener(), _g1h(g1h), _card_counts(NULL), _reserved_max_card_num(0) {
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
55 _listener.set_cardcounts(this);
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
56 }
10246
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
57
20337
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
58 void G1CardCounts::initialize(G1RegionToSpaceMapper* mapper) {
10246
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
59 assert(_g1h->max_capacity() > 0, "initialization order");
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
60 assert(_g1h->capacity() == 0, "initialization order");
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
61
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
62 if (G1ConcRSHotCardLimit > 0) {
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
63 // The max value we can store in the counts table is
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
64 // max_jubyte. Guarantee the value of the hot
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
65 // threshold limit is no more than this.
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
66 guarantee(G1ConcRSHotCardLimit <= max_jubyte, "sanity");
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
67
12343
d55c004e1d4d 8025305: Cleanup CardTableModRefBS usage in G1
mgerdin
parents: 12241
diff changeset
68 _ct_bs = _g1h->g1_barrier_set();
10246
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
69 _ct_bot = _ct_bs->byte_for_const(_g1h->reserved_region().start());
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
70
20337
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
71 _card_counts = (jubyte*) mapper->reserved().start();
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
72 _reserved_max_card_num = mapper->reserved().byte_size();
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
73 mapper->set_mapping_changed_listener(&_listener);
10246
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
74 }
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
75 }
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
76
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
77 uint G1CardCounts::add_card_count(jbyte* card_ptr) {
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
78 // Returns the number of times the card has been refined.
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
79 // If we failed to reserve/commit the counts table, return 0.
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
80 // If card_ptr is beyond the committed end of the counts table,
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
81 // return 0.
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
82 // Otherwise return the actual count.
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
83 // Unless G1ConcRSHotCardLimit has been set appropriately,
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
84 // returning 0 will result in the card being considered
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
85 // cold and will be refined immediately.
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
86 uint count = 0;
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
87 if (has_count_table()) {
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
88 size_t card_num = ptr_2_card_num(card_ptr);
20337
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
89 assert(card_num < _reserved_max_card_num,
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
90 err_msg("Card "SIZE_FORMAT" outside of card counts table (max size "SIZE_FORMAT")",
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
91 card_num, _reserved_max_card_num));
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
92 count = (uint) _card_counts[card_num];
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
93 if (count < G1ConcRSHotCardLimit) {
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
94 _card_counts[card_num] =
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
95 (jubyte)(MIN2((uintx)(_card_counts[card_num] + 1), G1ConcRSHotCardLimit));
10246
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
96 }
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
97 }
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
98 return count;
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
99 }
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
100
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
101 bool G1CardCounts::is_hot(uint count) {
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
102 return (count >= G1ConcRSHotCardLimit);
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
103 }
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
104
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
105 void G1CardCounts::clear_region(HeapRegion* hr) {
20337
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
106 MemRegion mr(hr->bottom(), hr->end());
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
107 clear_range(mr);
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
108 }
10246
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
109
20337
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
110 void G1CardCounts::clear_range(MemRegion mr) {
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
111 if (has_count_table()) {
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
112 const jbyte* from_card_ptr = _ct_bs->byte_for_const(mr.start());
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
113 // We use the last address in the range as the range could represent the
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
114 // last region in the heap. In which case trying to find the card will be an
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
115 // OOB access to the card table.
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
116 const jbyte* last_card_ptr = _ct_bs->byte_for_const(mr.last());
10246
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
117
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
118 #ifdef ASSERT
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
119 HeapWord* start_addr = _ct_bs->addr_for(from_card_ptr);
20337
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
120 assert(start_addr == mr.start(), "MemRegion start must be aligned to a card.");
10246
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
121 HeapWord* last_addr = _ct_bs->addr_for(last_card_ptr);
20337
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
122 assert((last_addr + CardTableModRefBS::card_size_in_words) == mr.end(), "MemRegion end must be aligned to a card.");
10246
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
123 #endif // ASSERT
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
124
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
125 // Clear the counts for the (exclusive) card range.
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
126 size_t from_card_num = ptr_2_card_num(from_card_ptr);
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
127 size_t to_card_num = ptr_2_card_num(last_card_ptr) + 1;
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
128 clear_range(from_card_num, to_card_num);
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
129 }
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
130 }
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
131
20337
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
132 class G1CardCountsClearClosure : public HeapRegionClosure {
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
133 private:
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
134 G1CardCounts* _card_counts;
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
135 public:
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
136 G1CardCountsClearClosure(G1CardCounts* card_counts) :
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
137 HeapRegionClosure(), _card_counts(card_counts) { }
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
138
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
139
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
140 virtual bool doHeapRegion(HeapRegion* r) {
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
141 _card_counts->clear_region(r);
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
142 return false;
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
143 }
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
144 };
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
145
10246
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
146 void G1CardCounts::clear_all() {
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
147 assert(SafepointSynchronize::is_at_safepoint(), "don't call this otherwise");
20337
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
148 G1CardCountsClearClosure cl(this);
1f1d373cd044 8038423: G1: Decommit memory within heap
tschatzl
parents: 17937
diff changeset
149 _g1h->heap_region_iterate(&cl);
10246
194f52aa2f23 7176479: G1: JVM crashes on T5-8 system with 1.5 TB heap
johnc
parents:
diff changeset
150 }