comparison src/share/vm/gc_implementation/g1/sparsePRT.hpp @ 14909:4ca6dc0799b6

Backout jdk9 merge
author Gilles Duboscq <duboscq@ssw.jku.at>
date Tue, 01 Apr 2014 13:57:07 +0200
parents 63a4eb8bcd23
children 89152779163c
comparison
equal deleted inserted replaced
14908:8db6e76cb658 14909:4ca6dc0799b6
1 /* 1 /*
2 * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2001, 2012, 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.
142 RSHashTable(size_t capacity); 142 RSHashTable(size_t capacity);
143 ~RSHashTable(); 143 ~RSHashTable();
144 144
145 // Attempts to ensure that the given card_index in the given region is in 145 // Attempts to ensure that the given card_index in the given region is in
146 // the sparse table. If successful (because the card was already 146 // the sparse table. If successful (because the card was already
147 // present, or because it was successfully added) returns "true". 147 // present, or because it was successfullly added) returns "true".
148 // Otherwise, returns "false" to indicate that the addition would 148 // Otherwise, returns "false" to indicate that the addition would
149 // overflow the entry for the region. The caller must transfer these 149 // overflow the entry for the region. The caller must transfer these
150 // entries to a larger-capacity representation. 150 // entries to a larger-capacity representation.
151 bool add_card(RegionIdx_t region_id, CardIdx_t card_index); 151 bool add_card(RegionIdx_t region_id, CardIdx_t card_index);
152 152
199 _rsht(rsht) {} 199 _rsht(rsht) {}
200 200
201 bool has_next(size_t& card_index); 201 bool has_next(size_t& card_index);
202 }; 202 };
203 203
204 // Concurrent access to a SparsePRT must be serialized by some external mutex. 204 // Concurrent accesss to a SparsePRT must be serialized by some external
205 // mutex.
205 206
206 class SparsePRTIter; 207 class SparsePRTIter;
207 class SparsePRTCleanupTask; 208 class SparsePRTCleanupTask;
208 209
209 class SparsePRT VALUE_OBJ_CLASS_SPEC { 210 class SparsePRT VALUE_OBJ_CLASS_SPEC {
245 size_t occupied() const { return _next->occupied_cards(); } 246 size_t occupied() const { return _next->occupied_cards(); }
246 size_t mem_size() const; 247 size_t mem_size() const;
247 248
248 // Attempts to ensure that the given card_index in the given region is in 249 // Attempts to ensure that the given card_index in the given region is in
249 // the sparse table. If successful (because the card was already 250 // the sparse table. If successful (because the card was already
250 // present, or because it was successfully added) returns "true". 251 // present, or because it was successfullly added) returns "true".
251 // Otherwise, returns "false" to indicate that the addition would 252 // Otherwise, returns "false" to indicate that the addition would
252 // overflow the entry for the region. The caller must transfer these 253 // overflow the entry for the region. The caller must transfer these
253 // entries to a larger-capacity representation. 254 // entries to a larger-capacity representation.
254 bool add_card(RegionIdx_t region_id, CardIdx_t card_index); 255 bool add_card(RegionIdx_t region_id, CardIdx_t card_index);
255 256