[aarch64-port-dev ] RFR(s): AArch64: 8149080: Recoginize disjoint array copy in stub code
Hui Shi
hui.shi at linaro.org
Mon Feb 8 11:58:15 UTC 2016
Thanks Edward!
>
>
> How did you disable the prefetch? Did you use
> -XX:PrefetchCopyIntervalInBytes=0?
I disable prefetch by removing prefetch in stub code and rebuild.
>
>
> > 1. Forward array copy can prefetch dest address needed in next string
> append.
> >
> > Most string append/concatenation operations will append chars after
> early appened char arrays.
> > For example, str = str1 + str2 + str3
> > 1. when append str1 in forward order, result value array(str.value)
> will be prefetched beyond str1's length with hardware prefetcher
> > 2. when store str2.value into str.value, str.value is already
> prefetched, less cache miss when copy str2.value into str.value
> > If copy in backward order, after copy str1.value into str.value, it's
> address before str.value[0] get prefetched, this is not useful for next
> append.
>
> I assume you are talking about automatic hardware prefetching here since
> the SW implementation does not do any prefetching on the destination? In
> that case I can see how repeated forward copys may be more efficient for
> string concatenation.
>
>
Yes, its hardware prefecher. perf profiling get the hardware generated
perfecher issued and used. and forward hardware prefetcher hit rate is much
higher in forward array copy.
Regards
Hui
More information about the aarch64-port-dev
mailing list