RFR: 8230877: Rename THREAD_LOCAL_DECL to thread_local
Kim Barrett
kim.barrett at oracle.com
Thu Sep 12 00:04:06 UTC 2019
> On Sep 11, 2019, at 7:46 PM, David Holmes <david.holmes at oracle.com> wrote:
>
> But as we are not actually enabling this as we don't turn on C++11, surely this still "looks good" enough? But we will have to look closer at things before turning it on? We may need to clarify our own rules for using thread-locals if we find there is a performance hit and we want to use the magic flag.
Part of the rationale for renaming to thread_local was that the
transition to C++11 was trivial. But apparently not so.
I really don't want to be tripping over this hidden performance hit
when trying to throw the language standard switch. (Assuming it's
measurable, but we hit Thread::current() quite a bit, and ZGC has a
bunch of thread-local variables pretty baked in and used fairly
heavily I think.) I do not want this little syntactic nicety to be an
argument for not throwing that switch.
And in the long run, I'd prefer a different name if we're going to
effectively have non-standard semantics (because of the usage
restrictions required by that compiler flag).
More information about the hotspot-dev
mailing list