Perform gc-state checks with LoadB to fit C2 matchers
Roman Kennke
rkennke at redhat.com
Tue Jun 12 16:29:48 UTC 2018
Am 12.06.2018 um 17:52 schrieb Aleksey Shipilev:
> http://cr.openjdk.java.net/~shade/shenandoah/c2-match-gc-state/webrev.01/
>
> Since we picked up the fix for matchers [1], all our precious LoadUB for gc-state loads now mismatch
> again. We can replace them with LoadB to match the other two matchers from upstream. Patch converts
> all LoadUBs for gc_state to LoadB, asserts the shape is correct, and blocks LoadB->LoadUB conversion
> in AddINode::Ideal.
>
> Sample WB check before:
>
> ...
> 0x00007fa89ccf0254: movzbl 0x20(%r15),%r11d
> 0x00007fa89ccf0259: test %r11d,%r11d
> ╭ 0x00007fa89ccf025c: jne 0x00007fa89ccf0278
> │ ...
> ↘ 0x00007fa89ccf0278: movzbl 0x20(%r15),%r11d
> 0x00007fa89ccf027d: test $0x14,%r11d
> 0x00007fa89ccf0284: jne 0x00007fa89ccf02d2
> ...
>
> Sample WB check after:
>
> 0x00007f3940de31b4: cmpb $0x0,0x20(%r15) ; heap-stable check
> ╭ 0x00007f3940de31b9: jne 0x00007f3940de31dd
> │ ...
> ↘ 0x00007f3940de31dd: testb $0x14,0x20(%r15) ; wb slowpath, evac-enabled check
> 0x00007f3940de31e2: jne 0x00007f3940de33ce
>
>
> Testing: tier3_gc_shenandoah, eyeballing assembly
>
> [1] https://bugs.openjdk.java.net/browse/JDK-8204479
>
Patch is ok.
Why don't we have matchers for LoadUB anymore?
Roman
More information about the shenandoah-dev
mailing list