[compiler-rt] ab17a08 - [fuchsia] Tune PrimaryGroupSizeLog to reduce fragmentation.
Chia-hung Duan via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 19 18:36:16 PST 2022
Author: Luke Nicholson
Date: 2022-12-20T02:33:52Z
New Revision: ab17a08d0f6ffd93cb25b46a4ed5e6ebe5af530e
URL: https://github.com/llvm/llvm-project/commit/ab17a08d0f6ffd93cb25b46a4ed5e6ebe5af530e
DIFF: https://github.com/llvm/llvm-project/commit/ab17a08d0f6ffd93cb25b46a4ed5e6ebe5af530e.diff
LOG: [fuchsia] Tune PrimaryGroupSizeLog to reduce fragmentation.
21U is the default group size, which demonstrates ~15mb reduction
in heap size for some highly fragmented heaps on Fuchsia, and
a general 5mb savings when devices are under no load.
Microbenchmarks show no performance regressions, but most of our
benchmarks perform no significant mallocs. So we are choosing the
default setting, and monitoring for potential performance
issues.
Reviewed By: Chia-hungDuan
Differential Revision: https://reviews.llvm.org/D140311
Added:
Modified:
compiler-rt/lib/scudo/standalone/allocator_config.h
Removed:
################################################################################
diff --git a/compiler-rt/lib/scudo/standalone/allocator_config.h b/compiler-rt/lib/scudo/standalone/allocator_config.h
index 2933714ea1545..63eb325c9b876 100644
--- a/compiler-rt/lib/scudo/standalone/allocator_config.h
+++ b/compiler-rt/lib/scudo/standalone/allocator_config.h
@@ -170,7 +170,7 @@ struct FuchsiaConfig {
typedef SizeClassAllocator64<FuchsiaConfig> Primary;
static const uptr PrimaryRegionSizeLog = 30U;
- static const uptr PrimaryGroupSizeLog = 30U;
+ static const uptr PrimaryGroupSizeLog = 21U;
typedef u32 PrimaryCompactPtrT;
static const bool PrimaryEnableRandomOffset = true;
static const uptr PrimaryMapSizeIncrement = 1UL << 18;
More information about the llvm-commits
mailing list