RFR: 8227054: ServiceThread needs to know about all OopStorage objects
Kim Barrett
kim.barrett at oracle.com
Tue Aug 20 21:10:58 UTC 2019
> On Aug 20, 2019, at 3:42 PM, coleen.phillimore at oracle.com wrote:
>
>
> The iterator code seems to have taken on a life of it's own, but the runtime changes still look good.
Thanks.
> Can you put some comment about why is there a singular iterator and what its purpose is? Is there some implicit use I can't find?
>
> + // Construct a singular iterator. The only valid operations are
> + // destruction/copy/assignment.
> + Iterator() :
> + _index(singular_index),
> + _limit(singular_index)
> + DEBUG_ONLY(COMMA _category(singular)) {}
> +
>
Does this help?
- // Construct a singular iterator. The only valid operations are
- // destruction/copy/assignment.
+ // Construct a singular iterator, not associated with any of the sets
+ // (strong, weak, or all) of storage objects. The only valid operations
+ // are destruction/copy/assignment.
Singular iterators exist so you can declare a variable and later assign to it, for example
Iterator it;
if (need_strong) {
it = strong_iterator();
} else {
it = weak_iterator();
}
… use the iterator …
The C++ standard uses the phrase “iterator with a singular value”; “singular iterator” is
a common shorthand.
More information about the hotspot-dev
mailing list