RFR: 8194312: Support parallel and concurrent JNI global handle processing

Kim Barrett kim.barrett at oracle.com
Fri Jan 12 08:53:41 UTC 2018


> 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.



More information about the hotspot-dev mailing list