/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "precompiled.hpp"
#include "gc_implementation/g1/heapRegion.hpp"
#include "gc_implementation/g1/heapRegionRemSet.hpp"
#include "gc_implementation/g1/sparsePRT.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/cardTableModRefBS.hpp"
#include "memory/space.inline.hpp"
#include "runtime/mutexLocker.hpp"
#define SPARSE_PRT_VERBOSE 0
}
for (int i = 0; i < cards_num(); i += UnrollFactor) {
}
#else
for (int i = 0; i < cards_num(); i++)
#endif
}
for (int i = 0; i < cards_num(); i += UnrollFactor) {
if (_cards[i] == card_index ||
}
#else
for (int i = 0; i < cards_num(); i++) {
if (_cards[i] == card_index) return true;
}
#endif
// Otherwise, we're full.
return false;
}
int sum = 0;
for (int i = 0; i < cards_num(); i += UnrollFactor) {
}
#else
for (int i = 0; i < cards_num(); i++) {
}
#endif
// Otherwise, we're full.
return sum;
}
CardIdx_t c;
for (int i = 0; i < cards_num(); i += UnrollFactor) {
c = _cards[i];
if (c == card_index) return found;
c = _cards[i + 1];
if (c == card_index) return found;
c = _cards[i + 2];
if (c == card_index) return found;
c = _cards[i + 3];
if (c == card_index) return found;
}
#else
for (int i = 0; i < cards_num(); i++) {
if (c == card_index) return found;
}
#endif
// Otherwise, we're full.
return overflow;
}
for (int i = 0; i < cards_num(); i += UnrollFactor) {
}
#else
for (int i = 0; i < cards_num(); i++) {
}
#endif
}
copy_cards(&e->_cards[0]);
}
// ----------------------------------------------------------------------
_occupied_entries(0), _occupied_cards(0),
{
clear();
}
RSHashTable::~RSHashTable() {
}
}
}
_occupied_entries = 0;
_occupied_cards = 0;
"_capacity too large");
// This will put -1 == NullEntry in the key field of all entries.
_free_region = 0;
}
"Postcondition of call above.");
e->num_valid_cards());
#endif
}
}
// Otherwise...
return true;
}
}
// Otherwise...
return cur;
}
}
// Otherwise, splice out "cur".
return true;
}
}
return cur;
} else {
return NULL;
}
}
// Insert at front.
}
return res;
}
int res;
if (_free_list != NullEntry) {
res = _free_list;
return res;
res = _free_region;
_free_region++;
return res;
} else {
return NullEntry;
}
}
_free_list = fi;
}
e->copy_cards(e2);
}
return res;
} else {
}
}
// Otherwise, none found:
return SparsePRTEntry::NullEntry;
}
}
_card_ind++;
SparsePRTEntry::NullEntry)) {
return true;
}
// Otherwise, must find the next valid entry.
_card_ind = 0;
return true;
}
}
// If we didn't return above, must go to the next non-null table index.
_tbl_ind++;
return true;
}
// Otherwise, try next entry.
_tbl_ind++;
}
// Otherwise, there were no entry.
return false;
}
}
return sizeof(this) +
}
// ----------------------------------------------------------------------
// We could expand multiple times in a pause -- only put on list once.
sprt->set_expanded(true);
while (true) {
(SparsePRT*)
}
}
(SparsePRT*)
return hd;
} else {
}
}
return NULL;
}
}
if (should_be_on_expanded_list()) {
sprt_cleanup_task->add(this);
}
}
} else {
}
}
if (_expanded) {
} else {
}
return expanded();
}
// First clean up all expanded tables so they agree on next and cur.
}
}
{
}
delete _next;
}
// We ignore "_cur" here, because it either = _next, or else it is
// on the deleted list.
}
#endif
expand();
}
}
}
}
}
// If they differ, _next is bigger then cur, so next has no chance of
// being the initial size.
delete _next;
}
delete _cur;
} else {
}
_expanded = false;
}
// Make sure that the current and next tables agree.
delete _cur;
}
set_expanded(false);
}
#endif
if (e->valid_entry()) {
e->r_ind());
#endif
}
}
delete last;
}
add_to_expanded_list(this);
}
} else {
}
}