Perform gc-state checks with LoadB to fit C2 matchers
Aleksey Shipilev
shade at redhat.com
Tue Jun 12 15:52:16 UTC 2018
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
More information about the shenandoah-dev
mailing list