[PATCH] D60593: [GwpAsan] Introduce GWP-ASan.
Matt Morehouse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 11 17:54:48 PDT 2019
morehouse added inline comments.
================
Comment at: compiler-rt/lib/gwp_asan/guarded_pool_allocator.h:64
+ // flag for this, so that we don't always sample the first allocation.
+ NextSampleCounter = (Random::getRandomUnsigned64() % SampleRate) + 1;
+ return NextSampleCounter == 1;
----------------
morehouse wrote:
> This looks unnecessarily complex and slow compared to a counter decrement. Do you have benchmarks indicating this is faster?
Never mind, I spoke too soon. Counter decrement is below...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60593/new/
https://reviews.llvm.org/D60593
More information about the llvm-commits
mailing list