src/hotspot/share/gc/g1/g1OopStarChunkedList.inline.hpp
changeset 54465 c4f16445675a
parent 52897 495c05ee2a9a
--- a/src/hotspot/share/gc/g1/g1OopStarChunkedList.inline.hpp	Mon Apr 08 11:11:22 2019 -0700
+++ b/src/hotspot/share/gc/g1/g1OopStarChunkedList.inline.hpp	Mon Apr 08 20:37:52 2019 +0200
@@ -72,13 +72,16 @@
 }
 
 template <typename T>
-void G1OopStarChunkedList::chunks_do(ChunkedList<T*, mtGC>* head, OopClosure* cl) {
+size_t G1OopStarChunkedList::chunks_do(ChunkedList<T*, mtGC>* head, OopClosure* cl) {
+  size_t result = 0;
   for (ChunkedList<T*, mtGC>* c = head; c != NULL; c = c->next_used()) {
+    result += c->size();
     for (size_t i = 0; i < c->size(); i++) {
       T* p = c->at(i);
       cl->do_oop(p);
     }
   }
+  return result;
 }
 
 #endif // SHARE_GC_G1_G1OOPSTARCHUNKEDLIST_INLINE_HPP