RFR (S): 7080389: G1: refactor marking code in evacuation pause copy closures
Stefan Karlsson
stefan.karlsson at oracle.com
Fri Aug 19 14:01:39 UTC 2011
Tony,
On 08/19/2011 03:48 PM, Tony Printezis wrote:
> Bengt,
>
> On 08/19/2011 09:01 AM, Bengt Rutisson wrote:
>>
>> * At the two places in the do_oop_work method where you use the
>> do_mark_forwardee paramter you have comments saying that it is an
>> initial mark closure. This is correct, so I think that I would
>> actually prefer that the parameter was called something with inital
>> mark rather than having to have the comments.
>
> Can I defend the name of the parameter? It is true that
> do_mark_forwardee is only true during an initial mark pause. But,
> during an initial mark pause only some of the specializations of the
> closure will have do_mark_forwardee set to true (the ones that scan
> roots). So, whether the do_mark_forwardee is true does not only depend
> on what kind of pause it is but also what kind of closure. So, IMHO,
> naming it "during initial mark" or something like that would actually
> be misleading.
But that's not what the comment says:
4339 // Need to mark the copied object if we're an initial
4340 // mark closure, or the object is already marked and
4341 // we need to preserve the mark.
4342 bool should_mark = do_mark_forwardee ||
4343 (_g1->mark_in_progress()&& !_g1->is_obj_ill(obj));
and
4357 // Object is not in collection set - if we're an initial mark
4358 // closure then mark the object.
4359 if (do_mark_forwardee) {
StefanK
>
> Tony
More information about the hotspot-gc-dev
mailing list