Happy path
Roland Westrelin
rwestrel at redhat.com
Mon Mar 19 13:18:37 UTC 2018
> *) On the ye-old SpscQueue benchmark, and this is how it looks with the patch:
> http://cr.openjdk.java.net/~shade/shenandoah/happy-path/happypath-1.perfasm
>
> It does coalescing well on non-membar paths. There are things to improve, e.g. back-to-back tests:
>
> 0.00% 0.02% │╰│││ 0x00007f8ab0b717f2: jmpq 0x00007f8ab0b7176f
> 1.88% 2.40% ↘ │││ 0x00007f8ab0b717f7: cmpb $0x0,0x400(%r15)
> 0.21% 0.31% │││ 0x00007f8ab0b717ff: jne 0x00007f8ab0b71871
> 0.00% 0.00% │││ 0x00007f8ab0b71801: cmpb $0x0,0x400(%r15)
> 0.67% 0.82% │││ 0x00007f8ab0b71809: jne 0x00007f8ab0b71889
> 1.88% 2.15% │││ 0x00007f8ab0b7180b: mov %r12d,0x10(%rcx,%r14,4)
> 2.19% 2.27% │││ 0x00007f8ab0b71810: cmpb $0x0,0x400(%r15)
> 0.01% 0.00% ╰││ 0x00007f8ab0b71818: je 0x00007f8ab0b71730
> ││ 0x00007f8ab0b7181e: testb $0x34,0x400(%r15)
> ╰│ 0x00007f8ab0b71826: je 0x00007f8ab0b71720
I think they are caused by membars that don't show up in the generated
code because they are nop on x86. Anyway, we can also clone membars:
http://cr.openjdk.java.net/~roland/shenandoah/happypath-membars/webrev.00/
with the hack below.
Roland.
diff --git a/src/hotspot/share/opto/loopopts.cpp b/src/hotspot/share/opto/loopopts.cpp
--- a/src/hotspot/share/opto/loopopts.cpp
+++ b/src/hotspot/share/opto/loopopts.cpp
@@ -1078,8 +1078,8 @@
if (m->is_FastLock())
return false;
#ifdef _LP64
- if (m->Opcode() == Op_ConvI2L)
- return false;
+ // if (m->Opcode() == Op_ConvI2L)
+ // return false;
if (m->is_CastII() && m->isa_CastII()->has_range_check()) {
return false;
}
More information about the shenandoah-dev
mailing list