RFR: 8277617: Optimize array copy and clear on x86_64 [v3]
David Holmes
dholmes at openjdk.java.net
Wed Nov 24 05:05:07 UTC 2021
On Tue, 23 Nov 2021 22:43:03 GMT, Sandhya Viswanathan <sviswanathan at openjdk.org> wrote:
>> src/hotspot/cpu/x86/vm_version_x86.hpp line 920:
>>
>>> 918: // is set to 0 for these platforms.
>>> 919: static int avx3_threshold() { return ((is_intel_family_core() &&
>>> 920: supports_serialize()) ? 0: AVX3Threshold); }
>>
>> Hi @sviswa7 , Should we not return a zero threshold only if user does not explicitly set AVX3Threshold i.e. in default case.
>
> @jatin-bhateja On these platforms it is beneficial to set the threshold to zero for copy and clear operations and hence the override. I have described that in the comment in detail as well.
@sviswa7 I tend to agree with @jatin-bhateja . AVX3Threshold is a diagnostic flag so if someone has deliberately modified it so they can measure something, your change will make that impossible on newer systems. You may want to define a static field to store the actual value for `avx3_threshold()` to return and initialize it during VM initialization. Or lazy initialize it on first use.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6512
More information about the hotspot-dev
mailing list