[PATCH] D28068: Whenever reasonable, merge ASAN quarantine batches to save memory.
Evgeniy Stepanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 22 15:53:52 PST 2016
eugenis accepted this revision.
eugenis added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: lib/sanitizer_common/sanitizer_quarantine.h:150
+ QuarantineBatch *Transfer(QuarantineCache *from_cache) {
+ QuarantineBatch *batch_to_deallocate = 0;
+ if (list_.empty() || from_cache->list_.empty() ||
----------------
nullptr
================
Comment at: lib/sanitizer_common/sanitizer_quarantine.h:166
+ // Two tail batches can be merged maintaining batch and cache invariants.
+ QuarantineBatch *from_batch = from_cache->DequeueBatch();
+ QuarantineBatch *to_batch = list_.back();
----------------
DequeueBatch unnecessarily updates from_cache size. Could you use from_cache->list_.front() instead?
https://reviews.llvm.org/D28068
More information about the llvm-commits
mailing list