[all-commits] [llvm/llvm-project] b1338d: [tsan] Shrink RiscV64 48-bit LowApp region slightl...

Thurston Dang via All-commits all-commits at lists.llvm.org
Fri Nov 17 09:27:45 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b1338d1e3a8c4b1b4c7364696852f67401fa40ca
      https://github.com/llvm/llvm-project/commit/b1338d1e3a8c4b1b4c7364696852f67401fa40ca
  Author: Thurston Dang <thurston.dang at gmail.com>
  Date:   2023-11-17 (Fri, 17 Nov 2023)

  Changed paths:
    M compiler-rt/lib/tsan/rtl/tsan_platform.h

  Log Message:
  -----------
  [tsan] Shrink RiscV64 48-bit LowApp region slightly to speed up TSan RestoreAddr (#72316)

The RiscV64 48-bit mappings introduced in
46cb8d9a325233ac11ed5e90367c43774294d87e necessitated changing
RestoreAddr to use 4-bits as the indicator. This roughly halves the
speed of RestoreAddr, because it is now brute-force testing addresses in
1TB increments, rather than 2TB increments. Crucially, this slowdown
applies to TSan on all platforms, not just RiscV64 48-bit.

This patch slightly shrinks the RiscV64 48-bit LowApp region mapping
(from 5TB to 4TB); we hope that 4TB ought to be enough for anybody,
especially since there is no ASLR applied to the binary in this region.
This allows restoring RestoreAddr to use 3-bits as the indicator again,
thus speeding up TSan on all platforms.

Co-authored-by: Thurston Dang <thurston at google.com>




More information about the All-commits mailing list