RFR: 8265867: thread.hpp defines some enums but no reference
Coleen Phillimore
coleenp at openjdk.java.net
Mon Apr 26 21:01:34 UTC 2021
On Mon, 26 Apr 2021 18:54:37 GMT, Xin Liu <xliu at openjdk.org> wrote:
> Deleted 2 useless enums.
> This patch also added const and constexpr for the applicable member functions.
src/hotspot/share/gc/shared/threadLocalAllocBuffer.hpp line 189:
> 187: static constexpr ByteSize end_offset() { return byte_offset_of(ThreadLocalAllocBuffer, _end); }
> 188: static constexpr ByteSize top_offset() { return byte_offset_of(ThreadLocalAllocBuffer, _top); }
> 189: static constexpr ByteSize pf_top_offset() { return byte_offset_of(ThreadLocalAllocBuffer, _pf_top); }
Is constexpr really necessary here? Isn't this usually a constant expression for most compilers?
-------------
PR: https://git.openjdk.java.net/jdk/pull/3702
More information about the hotspot-dev
mailing list