[PATCH] D31989: Avoid calling SizeClassMap::MaxCachedHint on hot path, it's not free.
Aleksey Shlyapnikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 12 14:04:31 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL300103: Avoid calling SizeClassMap::MaxCachedHint on hot path, it's not free. (authored by alekseyshl).
Changed prior to commit:
https://reviews.llvm.org/D31989?vs=95014&id=95029#toc
Repository:
rL LLVM
https://reviews.llvm.org/D31989
Files:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator_local_cache.h
Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator_local_cache.h
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator_local_cache.h
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator_local_cache.h
@@ -102,7 +102,7 @@
NOINLINE void Refill(PerClass *c, SizeClassAllocator *allocator,
uptr class_id) {
InitCache();
- uptr num_requested_chunks = SizeClassMap::MaxCachedHint(class_id);
+ uptr num_requested_chunks = c->max_count / 2;
allocator->GetFromAllocator(&stats_, class_id, c->chunks,
num_requested_chunks);
c->count = num_requested_chunks;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31989.95029.patch
Type: text/x-patch
Size: 729 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170412/1c6e1ae9/attachment.bin>
More information about the llvm-commits
mailing list