RFR: Some more descriptive names, removed redundant asserts. Request for comments. [v2]

Coleen Phillimore coleenp at openjdk.java.net
Wed Apr 6 00:39:28 UTC 2022


On Wed, 6 Apr 2022 00:16:25 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> src/hotspot/share/runtime/continuation.cpp line 1001:
>> 
>>> 999:   );
>>> 1000:   freeze_result try_freeze_fast(intptr_t* sp, bool chunk_available);
>>> 1001:   bool freeze_fast(intptr_t* top_sp, bool chunk_available);
>> 
>> We must not branch on the fast path (i.e. we might have budget to branch once or maybe twice). For now, this needs to remain a template parameter. It has no significant impact on build time and is just as easy to read. This kind of thing is how we managed to avoid writing it in assembly.
>
> This template seemed dubiously helpful and now we have 4 of this huge function, which the compiler may be able to throw away parts of.  Aside, can't see how the ConfigT parameter is used here.  Maybe we don't need that?   I'll revert it but we really dislike these templates and think that the C++ compiler can do just as good as a job optimizing this code.  Templates are not easy to read and even worse to debug, and essentially add a level of indirection for understanding the code.  The syntax and compilation messages are awful!  We need a set of benchmarks to justify this coding style.

No, 4 is an undercount.  How many of these are there?

-------------

PR: https://git.openjdk.java.net/loom/pull/139


More information about the loom-dev mailing list