RFR: JDK-8157141 & JDK-8166454: Solaris getisax(2) and meminfo(2) cleanup
Alan Burlison
Alan.Burlison at oracle.com
Thu Sep 29 17:42:21 UTC 2016
On 29/09/2016 00:15, Kim Barrett wrote:
> ------------------------------------------------------------------------------
> src/os_cpu/solaris_sparc/vm/vm_version_solaris_sparc.cpp
> 377 uint_t av1 = avs[AV_HW1_IDX];
> 378 if (av1 & AV_SPARC_MUL32) features |= hardware_mul32_m;
> ...
>
> Good to use the symbolic index AV_HW1_IDX. Bad form to assume we have
> that many entries. That should be
>
> if (avn > AV_HW1_IDX) {
> uint_t av1 = avs[AV_HW1_IDX];
> if (av1 & AV_SPARC_MUL32) features |= hardware_mul32_m;
> ...
> }
There is always at least one entry returned so the condition above will
always be true - we will never reduce the number of HW capabilities bits
so I believe the test is unnecessary. It's not there in the existing
version of the code either. However if you want me to add it I'll do so.
>> A JPRT hotspot testset run is clean.
>
> Have you used logging to hand-verify the expected features are being set?
I've run it under the debugger and single stepped through the code on a
T5 and T7. The features are set as expected.
--
Alan Burlison
--
More information about the hotspot-runtime-dev
mailing list