RFR: 8205607: Use oop_iterate instead of oop_iterate_no_header
Kim Barrett
kim.barrett at oracle.com
Tue Jun 26 12:48:42 UTC 2018
> On Jun 26, 2018, at 3:48 AM, Stefan Karlsson <stefan.karlsson at oracle.com> wrote:
> On 2018-06-26 09:12, Kim Barrett wrote:
>>> On Jun 25, 2018, at 7:25 PM, Stefan Karlsson <stefan.karlsson at oracle.com> wrote:
>>>
>>> On 2018-06-26 00:11, Kim Barrett wrote:
>>>> src/hotspot/share/gc/cms/compactibleFreeListSpace.cpp
>>>> 2438 class VerifyAllOopsClosure: public BasicOopIterateClosure {
>>>>
>>>> Seeing this here and elsewhere, I wish BasicOopIterateClosure were
>>>> called something like OopIterateNoMetadataClosure or
>>>> NoMetadataOopIterateClosure. "Basic" doesn't really tell me much.
>>>>
>>>> If you agree, such a name change can be another RFE.
> […]
> Here are some of the names on our whiteboard:
> […]
Looks like there is some overlap in thinking. We can discuss this
off-line later.
>>>> Some places that used to do oop_iterate_no_header now do oop_iterate
>>>> using some arbitrary (based on signature type) OopIterateClosure.
>>>> […]
>>>
>>> There shouldn't be a difference here. The old code also took a virtual call for the do_metadata function.
>> The old code completely ignored do_metadata and the like, didn’t it? Else what was the point of _no_header?
>
> No. See:
>
> -int oopDesc::oop_iterate_no_header(OopClosure* blk) {
> - // The NoHeaderExtendedOopClosure wraps the OopClosure and proxies all
> - // the do_oop calls, but turns off all other features in OopIterateClosure.
> - NoHeaderExtendedOopClosure cl(blk);
> - return oop_iterate_size(&cl);
> -}
Oh, right, I forgot about that. Happy to see that gone.
> I added them during the permgen removal so that we wouldn't have to change all OopClosures into ExtendedOopClosure, and thereby didn't have to deal with all the baggage that ExtendedOopClosure brought. Now that we are creating a leaner OopIterateClosure, I'd like to get rid of this.
>
> […]
> It was added as a convenience wrapper, so that closures that didn't need to care about metadata could remain inheriting from OopClosures instead of ExtendedOopClosure.
That's all before my time. Thanks for the history lesson; that
clears things up for me.
More information about the hotspot-gc-dev
mailing list