src/share/vm/gc_implementation/g1/g1StringDedupQueue.cpp
Print this page
rev 6141 : [mq]: review_fixes
@@ -80,11 +80,11 @@
// Queue is full, drop the string and update the statistics
Atomic::inc_ptr(&_queue->_dropped);
}
}
-bool G1StringDedupQueue::pop(oop& java_string) {
+oop G1StringDedupQueue::pop() {
assert(!SafepointSynchronize::is_at_safepoint(), "Must not be at safepoint");
No_Safepoint_Verifier nsv;
// Try all queues before giving up
for (size_t tries = 0; tries < _queue->_nqueues; tries++) {
@@ -93,23 +93,22 @@
while (!queue->is_empty()) {
oop obj = queue->pop();
// The oop we pop can be NULL if it was marked
// dead. Just ignore those and pop the next oop.
if (obj != NULL) {
- java_string = obj;
- return true;
+ return obj;
}
}
// Try next queue
_queue->_cursor = (_queue->_cursor + 1) % _queue->_nqueues;
}
// Mark empty
_queue->_empty = true;
- return false;
+ return NULL;
}
void G1StringDedupQueue::unlink_or_oops_do(G1StringDedupUnlinkOrOopsDoClosure* cl) {
// A worker thread first claims a queue, which ensures exclusive
// access to that queue, then continues to process it.