RFR: Update code location decoding for aarch64
Arthur Eubanks
aeubanks at openjdk.java.net
Thu May 14 15:52:04 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.
LGTM
-------------
PR: https://git.openjdk.java.net/tsan/pull/10
More information about the tsan-dev
mailing list