RFR: 8194312: Support parallel and concurrent JNI global handle processing
Erik Osterlund
erik.osterlund at oracle.com
Mon Jan 15 07:31:19 UTC 2018
Hi Kim,
On 15 Jan 2018, at 06:56, Kim Barrett <kim.barrett at oracle.com> wrote:
>> On Jan 12, 2018, at 3:53 AM, Kim Barrett <kim.barrett at oracle.com> wrote:
>>
>>> On Jan 11, 2018, at 7:56 PM, Kim Barrett <kim.barrett at oracle.com> wrote:
>>> One reason for iteration templates is to support const iteration.
>>> […]
>>>
>>> Another reason for iteration templates is to be forward-looking to
>>> C++11, where it becomes easy to pass in an instance of a local type,
>>> or a lambda, or a bind expression, all of which are ways to make
>>> used-in-one-place function objects conveniently at the point of use.
>>> This can often make the code much easier to understand than having to
>>> go somewhere else to find out what do_oop for *this* closure does.
>>>
>>> With a little work we could always use oops_do for iteration (and make
>>> iterate/iterate_safepoint private). There would be two versions of
>>> oops_do, one using cl->do_oop(p), the other cl(p), selected via a
>>> little metaprogramming (in C++11, I don't remember how hard it is in
>>> C++03, or if it's even possible.)
>>
>> Hm, maybe this is easier than I was thinking it might be. The difficulty
>> I was remembering seems to be a somewhat different case, and a simple
>> solution seems obvious now, except it’s kind of late, so maybe I’m tired
>> and missing something.
>>
>> I’ll look at it tomorrow.
>
> Never mind, I’m not seeing a way to do that selection easily with C++03.
> And the reasons for considering doing it don’t really exist until C++11.
> So I’m wanting to leave it as is.
Okay. Let’s revisit that in the future instead then. Ship it!
Thanks,
/Erik
More information about the hotspot-dev
mailing list