RFR [10]: Move (Java)Thread::_gc_state to lower offset to optimize barrier fast-path encoding
Roman Kennke
rkennke at redhat.com
Wed Jun 13 11:25:32 UTC 2018
Am 13.06.2018 um 13:05 schrieb Aleksey Shipilev:
> http://cr.openjdk.java.net/~shade/shenandoah/gcstate-low/webrev.01/
>
> We get this automatically with sh/jdk, because there we reuse the "GC thread locals" area. We can do
> the same trick in our backports, by moving the _gc_state field closer to Thread header, where GC
> thread locals would be. This saves us 3 bytes per barrier fastpath check on x86.
>
> WB check before:
>
> 0: testb $0x14,0x390(%r15)
> +8: jne 0x00007ff85bbb8900
> +10: ...
>
> WB check after:
>
> 0: testb $0x14,0x1c(%r15)
> +5: jne 0x00007f8a57bb887a
> +7: ...
>
> Testing: tier3_gc_shenandoah, eyeballing assembly
>
> Thanks,
> -Aleksey
>
Good idea! Do it!
Thanks,
Roman
More information about the shenandoah-dev
mailing list