RFR (L): 8060025: Object copy time regressions after JDK-8031323 and JDK-8057536

Kim Barrett kim.barrett at oracle.com
Thu Dec 18 23:46:18 UTC 2014

On Dec 15, 2014, at 7:03 AM, Thomas Schatzl <thomas.schatzl at oracle.com> wrote:
>> src/share/vm/gc_implementation/g1/g1ParScanThreadState.hpp
>>  88     assert(index < InCSetState::Num,
>> Instead of InCSetState::Num, consider
>>  sizeof(_dest) / sizeof(_dest[0])
>> And maybe we should add the usual array_size() utility to
>> globalDefinitions.hpp.  A quick search of hotspot sources shows many
>> places where it would be appropriate to use.
> This has been removed in the current change. 
> I would prefer to create a separate CR for introducing an array_size()
> method.

FYI, it turns out we already have ARRAY_SIZE() in globalDefinitions.hpp,
although not with the best definition for C++.  It was there at the dawn of
the mercurial age, though presently only used in about a dozen places
(out of *many* more where it would be appropriate).

More information about the hotspot-gc-dev mailing list