RFR: 8272520: Inline GenericTaskQueue::initialize() to the constructor [v2]

Albert Mingkun Yang ayang at openjdk.java.net
Mon Aug 16 14:46:53 UTC 2021


On Mon, 16 Aug 2021 14:28:37 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> Albert Mingkun Yang has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   review
>
> src/hotspot/share/gc/shared/taskqueue.inline.hpp line 53:
> 
>> 51: template<class E, MEMFLAGS F, unsigned int N>
>> 52: inline GenericTaskQueue<E, F, N>::GenericTaskQueue() : _last_stolen_queue_id(InvalidQueueId), _seed(17 /* random number */) {
>> 53:   assert(sizeof(Age) == sizeof(size_t), "Depends on this.");
> 
> [pre-existing] This assert is over-constraining.  The real requirement is static-asserted in the Age class.

Removed.

> src/hotspot/share/gc/shared/taskqueue.inline.hpp line 54:
> 
>> 52: inline GenericTaskQueue<E, F, N>::GenericTaskQueue() : _last_stolen_queue_id(InvalidQueueId), _seed(17 /* random number */) {
>> 53:   assert(sizeof(Age) == sizeof(size_t), "Depends on this.");
>> 54:   _elems = ArrayAllocator<E>::allocate(N, F);
> 
> `_elems` could be initialized in the mem-initializer-list.

Fixed.

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

PR: https://git.openjdk.java.net/jdk/pull/5125



More information about the hotspot-gc-dev mailing list