[Integrated] RFR: Update code location decoding for aarch64

Jie He github.com+10233373+jhe33 at openjdk.java.net
Fri May 15 03:26:35 UTC 2020


On Thu, 14 May 2020 10:24:58 GMT, Jie He <github.com+10233373+jhe33 at openjdk.org> wrote:

> Jdk/tsan uses a 64-bit value to identify the code location info. The
> lowest 16-bit for bci, the next 44-bit for method id, and the highest 4
> bits are reserved for internal purpose. 44 bits with 8 bytes alignment
> could represent 47-bit address space. It's sufficient for x86, but not
> for aarch64 whose heap address needs 48-bit in most cases.
> 
> According to current tsan memory mapping, method id on aarch64 could be
> allocated only in 3 memory regions, which highest 12 bits are fixed, they
> are 0x0, 0xaaa and 0xfff respectively. We could use it to distinguish
> which space the method id comes from.
> 
> After code location encoding in tsan_code_location(), the MSB of the
> id will be overwritten, but we can restore it in decoding function because
> we know the memory range the id is allocated to.
> 
> It won't impact the performance. The decoding function is only called
> when need to report a race.
> 
> I found the issue after enabled object field related instruments.

This pull request has now been integrated.

Changeset: 3c27e4dc
Author:    jie.he <jie.he at arm.com>
Committer: Arthur Eubanks <aeubanks at openjdk.org>
URL:       https://git.openjdk.java.net/tsan/commit/3c27e4dc
Stats:     17 lines in 1 file changed: 0 ins; 14 del; 3 mod

Update code location decoding for aarch64

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

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


More information about the tsan-dev mailing list