diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-05-13 22:28:24 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-05-17 09:54:36 -0700 |
commit | d18cb3937bdc2efede153abce1cd8ddae941d762 (patch) | |
tree | fc85b7d3dcfea9ea6261b79d56bda058b1f76d5e /src/journal | |
parent | 51b66c7a8a8afc8241373e864514d5ac7b87f169 (diff) | |
download | systemd-d18cb3937bdc2efede153abce1cd8ddae941d762.tar.gz |
Turn VALGRIND variable into a meson configuration switch
Configuration through environment variable is inconvenient with meson, because
they cannot be convieniently changed and/or are not preserved during
reconfiguration (https://github.com/mesonbuild/meson/issues/1503).
This adds -Dvalgrind=true/false, which has the advantage that it can be set
at any time with meson configure -Dvalgrind=... and ninja will rebuild targets
as necessary. Additional minor advantages are better consistency with the
options for hashmap debugging, and typo avoidance with '#if' instead of '#ifdef'.
Diffstat (limited to 'src/journal')
-rw-r--r-- | src/journal/lookup3.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/journal/lookup3.c b/src/journal/lookup3.c index ec241d2f36..ff194dd951 100644 --- a/src/journal/lookup3.c +++ b/src/journal/lookup3.c @@ -315,11 +315,11 @@ uint32_t jenkins_hashlittle( const void *key, size_t length, uint32_t initval) * then masks off the part it's not allowed to read. Because the * string is aligned, the masked-off tail is in the same word as the * rest of the string. Every machine with memory protection I've seen - * does it on word boundaries, so is OK with this. But VALGRIND will + * does it on word boundaries, so is OK with this. But valgrind will * still catch it and complain. The masking trick does make the hash * noticeably faster for short strings (like English words). */ -#if !defined(VALGRIND) && !defined(__SANITIZE_ADDRESS__) +#if !VALGRIND && !defined(__SANITIZE_ADDRESS__) switch(length) { @@ -500,11 +500,11 @@ void jenkins_hashlittle2( * then masks off the part it's not allowed to read. Because the * string is aligned, the masked-off tail is in the same word as the * rest of the string. Every machine with memory protection I've seen - * does it on word boundaries, so is OK with this. But VALGRIND will + * does it on word boundaries, so is OK with this. But valgrind will * still catch it and complain. The masking trick does make the hash * noticeably faster for short strings (like English words). */ -#if !defined(VALGRIND) && !defined(__SANITIZE_ADDRESS__) +#if !VALGRIND && !defined(__SANITIZE_ADDRESS__) switch(length) { @@ -676,11 +676,11 @@ uint32_t jenkins_hashbig( const void *key, size_t length, uint32_t initval) * then shifts out the part it's not allowed to read. Because the * string is aligned, the illegal read is in the same word as the * rest of the string. Every machine with memory protection I've seen - * does it on word boundaries, so is OK with this. But VALGRIND will + * does it on word boundaries, so is OK with this. But valgrind will * still catch it and complain. The masking trick does make the hash * noticeably faster for short strings (like English words). */ -#if !defined(VALGRIND) && !defined(__SANITIZE_ADDRESS__) +#if !VALGRIND && !defined(__SANITIZE_ADDRESS__) switch(length) { |