Integrated: 8272446 C1: Raw version of UnsafeGet generates load barriers
Stefan Karlsson
stefank at openjdk.java.net
Tue Aug 17 06:39:25 UTC 2021
On Fri, 13 Aug 2021 12:24:07 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
> Please review this patch to remove load barriers from the "raw" version of UnsafeGet.
>
> After rebasing the ZGC Generational code to latest openjdk/jdk we hit a crash because a load barrier was generated for some oops that are not supposed to have a load barrier. In upstream ZGC this isn't a problem because these load barriers are just redundant and will find healed good oops. However, in the Generational version un-barriered roots (e.g. thread stacks) have no metadata bits, and we should never perform normal load barriers on them (they are handled by stack watermarks and nmethod barriers).
>
> This load barrier was introduced with:
> JDK-8266746: C1: Replace UnsafeGetRaw with UnsafeGet when setting up OSR entry block
>
> which makes UnsafeGet _also_ handle "raw" loads. However, the "raw" path introduced a load barrier. Note that "raw" is often used to denote a function that loads/stores values without using a barrier.
>
> I've tested this with tier1-3 and have had some initial set of eyes looking over the patch, but it would be good to scrutinize this patch and the usage of UnsafeGet in GraphBuilder::setup_osr_entry_block.
>
> @TheRealMDoerr could you check if this patch works with PPC?
This pull request has now been integrated.
Changeset: df1427b7
Author: Stefan Karlsson <stefank at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/df1427b72ba1d02d440018a4f6f8a287fecad460
Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod
8272446: C1: Raw version of UnsafeGet generates load barriers
Reviewed-by: eosterlund, iveresov
-------------
PR: https://git.openjdk.java.net/jdk/pull/5109
More information about the hotspot-compiler-dev
mailing list