diff options
author | Fabio D'Urso <fdurso@google.com> | 2024-02-16 19:48:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-16 19:48:07 +0100 |
commit | cc673867d97aeb1151da5f7f0dc59d47eb384b45 (patch) | |
tree | d0b32665064c756103de431e82d477e1be451cde | |
parent | 2d9f3504491156282a3c785a562fcc0ba3c16161 (diff) | |
download | llvm-cc673867d97aeb1151da5f7f0dc59d47eb384b45.zip llvm-cc673867d97aeb1151da5f7f0dc59d47eb384b45.tar.gz llvm-cc673867d97aeb1151da5f7f0dc59d47eb384b45.tar.bz2 |
[scudo] Add ALWAYS_INLINE to ScopedTSD ctor (#81982)
Fix for performance regression introduced by #80061 that slowed
down Fuchsia's MallocFree microbenchmark by 3.5 - 8%
-rw-r--r-- | compiler-rt/lib/scudo/standalone/tsd_exclusive.h | 2 | ||||
-rw-r--r-- | compiler-rt/lib/scudo/standalone/tsd_shared.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler-rt/lib/scudo/standalone/tsd_exclusive.h b/compiler-rt/lib/scudo/standalone/tsd_exclusive.h index 5d8c7e4..a58ba65 100644 --- a/compiler-rt/lib/scudo/standalone/tsd_exclusive.h +++ b/compiler-rt/lib/scudo/standalone/tsd_exclusive.h @@ -30,7 +30,7 @@ template <class Allocator> struct TSDRegistryExT { using ThisT = TSDRegistryExT<Allocator>; struct ScopedTSD { - ScopedTSD(ThisT &TSDRegistry) { + ALWAYS_INLINE ScopedTSD(ThisT &TSDRegistry) { CurrentTSD = TSDRegistry.getTSDAndLock(&UnlockRequired); DCHECK_NE(CurrentTSD, nullptr); } diff --git a/compiler-rt/lib/scudo/standalone/tsd_shared.h b/compiler-rt/lib/scudo/standalone/tsd_shared.h index 0ac2be3..dade16d 100644 --- a/compiler-rt/lib/scudo/standalone/tsd_shared.h +++ b/compiler-rt/lib/scudo/standalone/tsd_shared.h @@ -29,7 +29,7 @@ struct TSDRegistrySharedT { using ThisT = TSDRegistrySharedT<Allocator, TSDsArraySize, DefaultTSDCount>; struct ScopedTSD { - ScopedTSD(ThisT &TSDRegistry) { + ALWAYS_INLINE ScopedTSD(ThisT &TSDRegistry) { CurrentTSD = TSDRegistry.getTSDAndLock(); DCHECK_NE(CurrentTSD, nullptr); } |