diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2014-12-12 17:48:13 +0100 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2014-12-20 09:25:37 -0500 |
commit | 4ccd9baa59b24ae700ccf39e01dbf36214e48a5f (patch) | |
tree | 66cbbcea492a7721712f1ddcd02bd81365c676e3 /src/shared/hashmap.h | |
parent | 3f006fb44de6f2308da94ea26b133773e18cb188 (diff) |
configure.ac: add a generic --enable-debug, replace --enable-hashmap-debug
There will be more debugging options later.
--enable-debug will enable them all.
--enable-debug=hashmap will enable only hashmap debugging.
Also rename the C #define to ENABLE_DEBUG_* pattern.
NOTE: We add the debugging code to hashmap.{c,h} but do not
add the option in configure.ac. We may do so at a later time.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/shared/hashmap.h')
-rw-r--r-- | src/shared/hashmap.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shared/hashmap.h b/src/shared/hashmap.h index 72c4adc5aa..894f67939e 100644 --- a/src/shared/hashmap.h +++ b/src/shared/hashmap.h @@ -32,7 +32,7 @@ * will be treated as empty hashmap for all read operations. That way it is not * necessary to instantiate an object for each Hashmap use. * - * If ENABLE_HASHMAP_DEBUG is defined (by configuring with --enable-hashmap-debug), + * If ENABLE_DEBUG_HASHMAP is defined (by configuring with --enable-debug=hashmap), * the implemention will: * - store extra data for debugging and statistics (see tools/gdb-sd_dump_hashmaps.py) * - perform extra checks for invalid use of iterators @@ -57,7 +57,7 @@ typedef struct Set Set; /* Stores just keys */ typedef struct { unsigned idx; /* index of an entry to be iterated next */ const void *next_key; /* expected value of that entry's key pointer */ -#ifdef ENABLE_HASHMAP_DEBUG +#ifdef ENABLE_DEBUG_HASHMAP unsigned put_count; /* hashmap's put_count recorded at start of iteration */ unsigned rem_count; /* hashmap's rem_count in previous iteration */ unsigned prev_idx; /* idx in previous iteration */ @@ -129,7 +129,7 @@ extern const struct hash_ops devt_hash_ops = { (Hashmap*)(h), \ (void)0) -#ifdef ENABLE_HASHMAP_DEBUG +#ifdef ENABLE_DEBUG_HASHMAP # define HASHMAP_DEBUG_PARAMS , const char *func, const char *file, int line # define HASHMAP_DEBUG_SRC_ARGS , __func__, __FILE__, __LINE__ # define HASHMAP_DEBUG_PASS_ARGS , func, file, line |