[scudo][standalone] Revert some perf-degrading changes

Summary:
A couple of seemingly innocuous changes ended up having a large impact
on the 32-bit performance. I still have to make those configurable at
some point, but right now it will have to do.

Subscribers: #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

Differential Revision: https://reviews.llvm.org/D73658
This commit is contained in:
Kostya Kortchinsky 2020-01-29 12:35:44 -08:00
parent d88a5c3987
commit 6cb830de6e
2 changed files with 4 additions and 2 deletions

View File

@ -74,7 +74,8 @@ public:
Sci->RandState = getRandomU32(&Seed);
// See comment in the 64-bit primary about releasing smaller size classes.
Sci->CanRelease = (ReleaseToOsInterval >= 0) &&
(getSizeByClassId(I) >= (PageSize / 64));
(I != SizeClassMap::BatchClassId) &&
(getSizeByClassId(I) >= (PageSize / 32));
}
ReleaseToOsIntervalMs = ReleaseToOsInterval;
}

View File

@ -87,7 +87,8 @@ public:
// limit is mostly arbitrary and based on empirical observations.
// TODO(kostyak): make the lower limit a runtime option
Region->CanRelease = (ReleaseToOsInterval >= 0) &&
(getSizeByClassId(I) >= (PageSize / 64));
(I != SizeClassMap::BatchClassId) &&
(getSizeByClassId(I) >= (PageSize / 32));
Region->RandState = getRandomU32(&Seed);
}
ReleaseToOsIntervalMs = ReleaseToOsInterval;