[Integrated] RFR: Enable field access instrumentation for aarch64
eric.1iu
github.com+10482586+erik1iu at openjdk.java.net
Wed May 27 16:06:45 UTC 2020
On Thu, 21 May 2020 09:58:14 GMT, eric.1iu <github.com+10482586+erik1iu at openjdk.org> wrote:
> This patch enables field access instrumentation for aarch64.
>
> According to the implementation of x86, this patch inserts TSAN
> functions in interpreter (templateTable_aarch64.cpp) at three places
> which can cover all field accesses:
>
> 1. getfield_or_static
> 2. putfield_or_static
> 3. load_field_cp_cache_entry
>
> This patch implements the annotation
> 'java.util.concurrent.annotation.LazyInit', which causes TSAN to ignore
> races on that field. References that marked by @LazyInit are not simply
> ignored, but a release/acquire is performed on them. This is so that any
> following accesses to its member variables are not also reported as race.
>
> This patch also moves some architecture independent code into common
> files.
>
> TODO:
> - Array access instrumentation will be updated in later patch.
>
> [Tests]
> test/hotspot/jtreg/tsan/RacyByteMemberLoopTest.java
> test/hotspot/jtreg/tsan/RacyCharMemberLoopTest.java
> test/hotspot/jtreg/tsan/RacyShortMemberLoopTest.java
> test/hotspot/jtreg/tsan/RacyIntMemberLoopTest.java
> test/hotspot/jtreg/tsan/RacyFloatMemberLoopTest.java
> test/hotspot/jtreg/tsan/RacyLongMemberLoopTest.java
> test/hotspot/jtreg/tsan/RacyDoubleMemberLoopTest.java
> test/hotspot/jtreg/tsan/LazyInitLoopTest.java
> test/hotspot/jtreg/tsan/LazyInitReferenceLoopTest.java
>
> With this patch, those test cases above passed on aarch64.
> No new failure found on x86.
This pull request has now been integrated.
Changeset: 7f1f31a1
Author: Eric Liu <eric.c.liu at arm.com>
Committer: Arthur Eubanks <aeubanks at openjdk.org>
URL: https://git.openjdk.java.net/tsan/commit/7f1f31a1
Stats: 225 lines in 5 files changed: 52 ins; 168 del; 5 mod
Enable field access instrumentation for aarch64
-------------
PR: https://git.openjdk.java.net/tsan/pull/11
More information about the tsan-dev
mailing list