RFR: 8047821: G1 Does not use the save_marks functionality as intended
Stefan Karlsson
stefan.karlsson at oracle.com
Tue Jun 24 10:25:25 UTC 2014
On 2014-06-23 16:26, Mikael Gerdin wrote:
> Hi!
>
> As part of a larger effort to detach G1's HeapRegion from ContiguousSpace[1]
> and as a general cleanup we should rename the save_marks and set_saved_marks
> methods on HeapRegion. They are not used with oops_since_saved_marks_iterate
> and cause more confusion than anything.
>
> This change is part of a set of 4 changes: 8047818, 8047819, 8047820, 8047821
> which are needed to refactor the HeapRegion class and its superclasses
> in order to simplify the G1 class unloading change which is coming.
>
> Bug:
> https://bugs.openjdk.java.net/browse/JDK-8047821
> Webrev:
> http://cr.openjdk.java.net/~mgerdin/8047821/webrev/
Looks good, but it would be nice if you could remove these as well:
http://cr.openjdk.java.net/~mgerdin/8047821/webrev/src/share/vm/gc_implementation/g1/heapRegion.hpp.frames.html
583 // Apply "cl->do_oop" to (the addresses of) all reference fields in objects
584 // allocated in the current region before the last call to "save_mark".
585 void oop_before_save_marks_iterate(ExtendedOopClosure* cl);
and
205 // Requires that the region "mr" be dense with objects, and begin and end
206 // with an object.
207 void oops_in_mr_iterate(MemRegion mr, ExtendedOopClosure* cl);
and
396 void HeapRegion::oops_in_mr_iterate(MemRegion mr, ExtendedOopClosure* cl) {
397 HeapWord* p = mr.start();
398 HeapWord* e = mr.end();
399 oop obj;
400 while (p < e) {
401 obj = oop(p);
402 p += obj->oop_iterate(cl);
403 }
404 assert(p == e, "bad memregion: doesn't end on obj boundary");
405 }
thanks,
StefanK
>
> [1] https://bugs.openjdk.java.net/browse/JDK-8047818
>
> Thanks
> /Mikael
More information about the hotspot-gc-dev
mailing list