acmp/cas retries and null arguments

Aleksey Shipilev shade at redhat.com
Thu Sep 22 17:38:04 UTC 2016


On 09/22/2016 07:04 PM, Aleksey Shipilev wrote:
> On 09/14/2016 06:39 PM, Aleksey Shipilev wrote:
>> I'll take a look 
> 
> Was slacking off while new CAS code breeds in my mind.
> 
> acmp(%a, %b):
>   cmp %a, %b
>   je done
> 
>     test %a, %a
>     je <over1> // the idea was to jump to "done"
>     shenandoah_rb (%a)
>     over1:
> 
>     test %b, %b
>     je <over2> // the idea was to jump to "done"
>     shenandoah_rb (%b)
>     over2:
> 
>     cmp %a, %b;
>  done:
> 
> So, I tried several things, and none of them work better than our
> current code, at least in C1, which looks optimal.

One more thing. As one of the desperate tests, I put the
is_evac_in_progress test within the slowpath branch, and lo and behold,
the performance improved drastically (from 80 us/op to 55 us/op, with 33
us/op for Parallel). Slowpath is slow, no doubt.

While it is incorrect to test for is_evac_in_progress here, it makes you
wonder if there are long "quiet" phases when neither evacuation or
remark/rewrite is in progress, which we can let mutator to test for, and
so we can bail earlier...

Thanks,
-Aleksey



More information about the shenandoah-dev mailing list