[Rev 01] RFR: Enable field access instrumentation for aarch64

eric.1iu github.com+10482586+erik1iu at openjdk.java.net
Wed May 27 02:28:29 UTC 2020


> 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.

eric.1iu has refreshed the contents of this pull request, and previous commits have been removed. The incremental views
will show differences compared to the previous content of the PR. The pull request contains one new commit since the
last revision:

  [TSAN] Enable field access instrumentation for aarch64
  
  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.
  
  Change-Id: I867124a6166c54040ac313fb366861dfc845f18d

-------------

Changes:
  - all: https://git.openjdk.java.net/tsan/pull/11/files
  - new: https://git.openjdk.java.net/tsan/pull/11/files/fa8696f9..ab84aeb7

Webrevs:
 - full: https://webrevs.openjdk.java.net/tsan/11/webrev.01
 - incr: https://webrevs.openjdk.java.net/tsan/11/webrev.00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/tsan/pull/11.diff
  Fetch: git fetch https://git.openjdk.java.net/tsan pull/11/head:pull/11

PR: https://git.openjdk.java.net/tsan/pull/11


More information about the tsan-dev mailing list