< prev index next >
src/share/vm/gc/g1/dirtyCardQueue.cpp
Print this page
rev 10336 : [mq]: inc1
*** 123,152 ****
}
return res;
}
bool DirtyCardQueue::apply_closure_to_buffer(CardTableEntryClosure* cl,
! BufferNode* node, size_t sz,
bool consume,
uint worker_i) {
if (cl == NULL) return true;
void** buf = BufferNode::make_buffer_from_node(node);
! size_t limit = byte_index_to_index(sz);
for (size_t i = byte_index_to_index(node->index()); i < limit; ++i) {
jbyte* card_ptr = static_cast<jbyte*>(buf[i]);
assert(card_ptr != NULL, "invariant");
if (!cl->do_card_ptr(card_ptr, worker_i)) {
if (consume) {
size_t new_index = index_to_byte_index(i + 1);
! assert(new_index <= sz, "invariant");
node->set_index(new_index);
}
return false;
}
}
if (consume) {
! node->set_index(sz);
}
return true;
}
DirtyCardQueueSet::DirtyCardQueueSet(bool notify_when_complete) :
--- 123,153 ----
}
return res;
}
bool DirtyCardQueue::apply_closure_to_buffer(CardTableEntryClosure* cl,
! BufferNode* node,
! size_t buffer_size,
bool consume,
uint worker_i) {
if (cl == NULL) return true;
void** buf = BufferNode::make_buffer_from_node(node);
! size_t limit = byte_index_to_index(buffer_size);
for (size_t i = byte_index_to_index(node->index()); i < limit; ++i) {
jbyte* card_ptr = static_cast<jbyte*>(buf[i]);
assert(card_ptr != NULL, "invariant");
if (!cl->do_card_ptr(card_ptr, worker_i)) {
if (consume) {
size_t new_index = index_to_byte_index(i + 1);
! assert(new_index <= buffer_size, "invariant");
node->set_index(new_index);
}
return false;
}
}
if (consume) {
! node->set_index(buffer_size);
}
return true;
}
DirtyCardQueueSet::DirtyCardQueueSet(bool notify_when_complete) :
< prev index next >