33 // Helper class to mark through large objArrays during marking in an efficient way.
34 // Instead of pushing large object arrays, we push continuations onto the
35 // mark stack. These continuations are identified by having their LSB set.
36 // This allows incremental processing of large objects.
37 class G1CMObjArrayProcessor VALUE_OBJ_CLASS_SPEC {
38 private:
39 // Reference to the task for doing the actual work.
40 G1CMTask* _task;
41
42 // Push the continuation at the given address onto the mark stack.
43 void push_array_slice(HeapWord* addr);
44
45 // Process (apply the closure) on the given continuation of the given objArray.
46 size_t process_array_slice(objArrayOop const obj, HeapWord* start_from, size_t remaining);
47 public:
48 static bool should_be_sliced(oop obj);
49
50 G1CMObjArrayProcessor(G1CMTask* task) : _task(task) {
51 }
52
53 // Process the given continuation "oop". Returns the number of words scanned.
54 size_t process_slice(HeapWord* slice);
55 // Start processing the given objArrayOop by scanning the header and pushing its
56 // continuation.
57 size_t process_obj(oop obj);
58 };
59
60 #endif /* SHARE_VM_GC_G1_G1CONCURRENTMARKOBJARRAYPROCESSOR_HPP */
|
33 // Helper class to mark through large objArrays during marking in an efficient way.
34 // Instead of pushing large object arrays, we push continuations onto the
35 // mark stack. These continuations are identified by having their LSB set.
36 // This allows incremental processing of large objects.
37 class G1CMObjArrayProcessor VALUE_OBJ_CLASS_SPEC {
38 private:
39 // Reference to the task for doing the actual work.
40 G1CMTask* _task;
41
42 // Push the continuation at the given address onto the mark stack.
43 void push_array_slice(HeapWord* addr);
44
45 // Process (apply the closure) on the given continuation of the given objArray.
46 size_t process_array_slice(objArrayOop const obj, HeapWord* start_from, size_t remaining);
47 public:
48 static bool should_be_sliced(oop obj);
49
50 G1CMObjArrayProcessor(G1CMTask* task) : _task(task) {
51 }
52
53 // Process the given continuation. Returns the number of words scanned.
54 size_t process_slice(HeapWord* slice);
55 // Start processing the given objArrayOop by scanning the header and pushing its
56 // continuation.
57 size_t process_obj(oop obj);
58 };
59
60 #endif /* SHARE_VM_GC_G1_G1CONCURRENTMARKOBJARRAYPROCESSOR_HPP */
|