Commit 72f89937 authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

#4590 replace drd annotations with helgrind annotations refs[t:4590]

git-svn-id: file:///svn/toku/tokudb@40488 c7de825b-a66e-492c-adef-691d508d4ae1
parent da1fe0b1
...@@ -275,9 +275,9 @@ toku_set_func_free(free_fun_t f) { ...@@ -275,9 +275,9 @@ toku_set_func_free(free_fun_t f) {
t_free = f; t_free = f;
} }
#include <valgrind/drd.h> #include <valgrind/helgrind.h>
void __attribute__((constructor)) toku_memory_drd_ignore(void); void __attribute__((constructor)) toku_memory_helgrind_ignore(void);
void void
toku_memory_drd_ignore(void) { toku_memory_helgrind_ignore(void) {
DRD_IGNORE_VAR(status); VALGRIND_HG_DISABLE_CHECKING(&status, sizeof status);
} }
...@@ -1859,11 +1859,11 @@ flush_node_on_background_thread(BRT brt, BRTNODE parent) ...@@ -1859,11 +1859,11 @@ flush_node_on_background_thread(BRT brt, BRTNODE parent)
} }
} }
#include <valgrind/drd.h> #include <valgrind/helgrind.h>
void __attribute__((__constructor__)) toku_brt_flusher_drd_ignore(void); void __attribute__((__constructor__)) toku_brt_flusher_helgrind_ignore(void);
void void
toku_brt_flusher_drd_ignore(void) { toku_brt_flusher_helgrind_ignore(void) {
DRD_IGNORE_VAR(brt_flusher_status); VALGRIND_HG_DISABLE_CHECKING(&brt_flusher_status, sizeof brt_flusher_status);
} }
#undef STATUS_VALUE #undef STATUS_VALUE
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include <brt-flusher-internal.h> #include <brt-flusher-internal.h>
#include <brt-cachetable-wrappers.h> #include <brt-cachetable-wrappers.h>
#include <brt-internal.h> #include <brt-internal.h>
#include <valgrind/drd.h>
// Member Descirption: // Member Descirption:
// 1. highest_pivot_key - this is the key that corresponds to the // 1. highest_pivot_key - this is the key that corresponds to the
...@@ -370,11 +369,12 @@ toku_brt_hot_optimize(BRT brt, ...@@ -370,11 +369,12 @@ toku_brt_hot_optimize(BRT brt,
return r; return r;
} }
void __attribute__((__constructor__)) toku_hot_drd_ignore(void); #include <valgrind/helgrind.h>
void __attribute__((__constructor__)) toku_hot_helgrind_ignore(void);
void void
toku_hot_drd_ignore(void) { toku_hot_helgrind_ignore(void) {
// incremented only while lock is held, but read by engine status asynchronously. // incremented only while lock is held, but read by engine status asynchronously.
DRD_IGNORE_VAR(hot_status); VALGRIND_HG_DISABLE_CHECKING(&hot_status, sizeof hot_status);
} }
......
...@@ -125,7 +125,7 @@ basement nodes, bulk fetch, and partial fetch: ...@@ -125,7 +125,7 @@ basement nodes, bulk fetch, and partial fetch:
#include "sort.h" #include "sort.h"
#include <brt-cachetable-wrappers.h> #include <brt-cachetable-wrappers.h>
#include <brt-flusher.h> #include <brt-flusher.h>
#include <valgrind/drd.h> #include <valgrind/helgrind.h>
#if defined(HAVE_CILK) #if defined(HAVE_CILK)
#include <cilk/cilk.h> #include <cilk/cilk.h>
...@@ -6686,11 +6686,11 @@ toku_brt_header_init(struct brt_header *h, ...@@ -6686,11 +6686,11 @@ toku_brt_header_init(struct brt_header *h,
h->root_xid_that_created = root_xid_that_created; h->root_xid_that_created = root_xid_that_created;
} }
#include <valgrind/drd.h> #include <valgrind/helgrind.h>
void __attribute__((__constructor__)) toku_brt_drd_ignore(void); void __attribute__((__constructor__)) toku_brt_helgrind_ignore(void);
void void
toku_brt_drd_ignore(void) { toku_brt_helgrind_ignore(void) {
DRD_IGNORE_VAR(brt_status); VALGRIND_HG_DISABLE_CHECKING(&brt_status, sizeof brt_status);
} }
#undef STATUS_VALUE #undef STATUS_VALUE
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#include <string.h> #include <string.h>
#include <time.h> #include <time.h>
#include <stdarg.h> #include <stdarg.h>
#include <valgrind/drd.h> #include <valgrind/helgrind.h>
#include "memory.h" #include "memory.h"
#include "workqueue.h" #include "workqueue.h"
...@@ -500,12 +500,12 @@ int toku_create_cachetable(CACHETABLE *result, long size_limit, LSN UU(initial_l ...@@ -500,12 +500,12 @@ int toku_create_cachetable(CACHETABLE *result, long size_limit, LSN UU(initial_l
CACHETABLE MALLOC(ct); CACHETABLE MALLOC(ct);
if (ct == 0) return ENOMEM; if (ct == 0) return ENOMEM;
memset(ct, 0, sizeof(*ct)); memset(ct, 0, sizeof(*ct));
DRD_IGNORE_VAR(ct->size_nonleaf); // modified only when the cachetable lock is held, but read by engine status VALGRIND_HG_DISABLE_CHECKING(&ct->size_nonleaf, sizeof ct->size_nonleaf); // modified only when the cachetable lock is held, but read by engine status
DRD_IGNORE_VAR(ct->size_current); VALGRIND_HG_DISABLE_CHECKING(&ct->size_current, sizeof ct->size_current);
DRD_IGNORE_VAR(ct->size_evicting); VALGRIND_HG_DISABLE_CHECKING(&ct->size_evicting, sizeof ct->size_evicting);
DRD_IGNORE_VAR(ct->size_leaf); VALGRIND_HG_DISABLE_CHECKING(&ct->size_leaf, sizeof ct->size_leaf);
DRD_IGNORE_VAR(ct->size_rollback); VALGRIND_HG_DISABLE_CHECKING(&ct->size_rollback, sizeof ct->size_rollback);
DRD_IGNORE_VAR(ct->size_cachepressure); VALGRIND_HG_DISABLE_CHECKING(&ct->size_cachepressure, sizeof ct->size_cachepressure);
ct->table_size = 4; ct->table_size = 4;
rwlock_init(&ct->pending_lock); rwlock_init(&ct->pending_lock);
XCALLOC_N(ct->table_size, ct->table); XCALLOC_N(ct->table_size, ct->table);
...@@ -4042,23 +4042,23 @@ toku_cleaner_thread (void *cachetable_v) ...@@ -4042,23 +4042,23 @@ toku_cleaner_thread (void *cachetable_v)
return 0; return 0;
} }
void __attribute__((__constructor__)) toku_cachetable_drd_ignore(void); void __attribute__((__constructor__)) toku_cachetable_helgrind_ignore(void);
void void
toku_cachetable_drd_ignore(void) { toku_cachetable_helgrind_ignore(void) {
DRD_IGNORE_VAR(cachetable_hit); VALGRIND_HG_DISABLE_CHECKING(&cachetable_hit, sizeof cachetable_hit);
DRD_IGNORE_VAR(cachetable_miss); VALGRIND_HG_DISABLE_CHECKING(&cachetable_miss, sizeof cachetable_miss);
DRD_IGNORE_VAR(cachetable_misstime); VALGRIND_HG_DISABLE_CHECKING(&cachetable_misstime, sizeof cachetable_misstime);
DRD_IGNORE_VAR(cachetable_waittime); VALGRIND_HG_DISABLE_CHECKING(&cachetable_waittime, sizeof cachetable_waittime);
DRD_IGNORE_VAR(cachetable_wait_reading); VALGRIND_HG_DISABLE_CHECKING(&cachetable_wait_reading, sizeof cachetable_wait_reading);
DRD_IGNORE_VAR(cachetable_wait_writing); VALGRIND_HG_DISABLE_CHECKING(&cachetable_wait_writing, sizeof cachetable_wait_writing);
DRD_IGNORE_VAR(cachetable_wait_checkpoint); VALGRIND_HG_DISABLE_CHECKING(&cachetable_wait_checkpoint, sizeof cachetable_wait_checkpoint);
DRD_IGNORE_VAR(cachetable_puts); VALGRIND_HG_DISABLE_CHECKING(&cachetable_puts, sizeof cachetable_puts);
DRD_IGNORE_VAR(cachetable_prefetches); VALGRIND_HG_DISABLE_CHECKING(&cachetable_prefetches, sizeof cachetable_prefetches);
DRD_IGNORE_VAR(cachetable_maybe_get_and_pins); VALGRIND_HG_DISABLE_CHECKING(&cachetable_maybe_get_and_pins, sizeof cachetable_maybe_get_and_pins);
DRD_IGNORE_VAR(cachetable_maybe_get_and_pin_hits); VALGRIND_HG_DISABLE_CHECKING(&cachetable_maybe_get_and_pin_hits, sizeof cachetable_maybe_get_and_pin_hits);
DRD_IGNORE_VAR(cachetable_evictions); VALGRIND_HG_DISABLE_CHECKING(&cachetable_evictions, sizeof cachetable_evictions);
DRD_IGNORE_VAR(cleaner_executions); VALGRIND_HG_DISABLE_CHECKING(&cleaner_executions, sizeof cleaner_executions);
DRD_IGNORE_VAR(ct_status); VALGRIND_HG_DISABLE_CHECKING(&ct_status, sizeof ct_status);
} }
#undef STATUS_VALUE #undef STATUS_VALUE
...@@ -335,13 +335,13 @@ toku_checkpoint(CACHETABLE ct, TOKULOGGER logger, ...@@ -335,13 +335,13 @@ toku_checkpoint(CACHETABLE ct, TOKULOGGER logger,
return r; return r;
} }
#include <valgrind/drd.h> #include <valgrind/helgrind.h>
void __attribute__((__constructor__)) toku_checkpoint_drd_ignore(void); void __attribute__((__constructor__)) toku_checkpoint_helgrind_ignore(void);
void void
toku_checkpoint_drd_ignore(void) { toku_checkpoint_helgrind_ignore(void) {
DRD_IGNORE_VAR(cp_status); VALGRIND_HG_DISABLE_CHECKING(&cp_status, sizeof cp_status);
DRD_IGNORE_VAR(locked_mo); VALGRIND_HG_DISABLE_CHECKING(&locked_mo, sizeof locked_mo);
DRD_IGNORE_VAR(locked_cs); VALGRIND_HG_DISABLE_CHECKING(&locked_cs, sizeof locked_cs);
} }
#undef SET_CHECKPOINT_FOOTPRINT #undef SET_CHECKPOINT_FOOTPRINT
......
...@@ -799,16 +799,7 @@ toku_txn_get_state(TOKUTXN txn) { ...@@ -799,16 +799,7 @@ toku_txn_get_state(TOKUTXN txn) {
return txn->state; return txn->state;
} }
#include <valgrind/drd.h>
void __attribute__((__constructor__)) toku_txn_status_drd_ignore(void);
void
toku_txn_status_drd_ignore(void) {
DRD_IGNORE_VAR(txn_status);
}
#include <valgrind/helgrind.h> #include <valgrind/helgrind.h>
void __attribute__((__constructor__)) toku_txn_status_helgrind_ignore(void); void __attribute__((__constructor__)) toku_txn_status_helgrind_ignore(void);
void void
toku_txn_status_helgrind_ignore(void) { toku_txn_status_helgrind_ignore(void) {
......
...@@ -2329,11 +2329,11 @@ toku_le_upgrade_13_14(LEAFENTRY_13 old_leafentry, ...@@ -2329,11 +2329,11 @@ toku_le_upgrade_13_14(LEAFENTRY_13 old_leafentry,
return rval; return rval;
} }
#include <valgrind/drd.h> #include <valgrind/helgrind.h>
void __attribute__((__constructor__)) toku_ule_drd_ignore(void); void __attribute__((__constructor__)) toku_ule_helgrind_ignore(void);
void void
toku_ule_drd_ignore(void) { toku_ule_helgrind_ignore(void) {
DRD_IGNORE_VAR(le_status); VALGRIND_HG_DISABLE_CHECKING(&le_status, sizeof le_status);
} }
#undef STATUS_VALUE #undef STATUS_VALUE
...@@ -897,6 +897,9 @@ helgrind3.bdbrun: BDBVGRIND=$(HGRIND) ...@@ -897,6 +897,9 @@ helgrind3.bdbrun: BDBVGRIND=$(HGRIND)
test_groupcommit_count_hgrind.tdbrun: HGRIND+=--suppressions=helgrind.suppressions test_groupcommit_count_hgrind.tdbrun: HGRIND+=--suppressions=helgrind.suppressions
test_groupcommit_count_hgrind.tdbrun: test_groupcommit_count.tdb$(BINSUF) test_groupcommit_count_hgrind.tdbrun: test_groupcommit_count.tdb$(BINSUF)
$(HGRIND) ./test_groupcommit_count.tdb$(BINSUF) $(VERBVERBOSE) -n 1 -p hgrind $(SUMMARIZE_CMD) $(HGRIND) ./test_groupcommit_count.tdb$(BINSUF) $(VERBVERBOSE) -n 1 -p hgrind $(SUMMARIZE_CMD)
test_groupcommit_count_drd.tdbrun: DRD+=--suppressions=drd.suppressions
test_groupcommit_count_drd.tdbrun: test_groupcommit_count.tdb$(BINSUF)
$(DRD) ./test_groupcommit_count.tdb$(BINSUF) $(VERBVERBOSE) -n 1 -p drd $(SUMMARIZE_CMD)
test_groupcommit_count_vgrind.tdbrun: test_groupcommit_count.tdb$(BINSUF) test_groupcommit_count_vgrind.tdbrun: test_groupcommit_count.tdb$(BINSUF)
$(VGRIND) ./test_groupcommit_count.tdb$(BINSUF) $(VERBVERBOSE) -n 1 -p vgrind $(SUMMARIZE_CMD) $(VGRIND) ./test_groupcommit_count.tdb$(BINSUF) $(VERBVERBOSE) -n 1 -p vgrind $(SUMMARIZE_CMD)
......
...@@ -2938,9 +2938,9 @@ toku_test_get_checkpointing_user_data_status (void) { ...@@ -2938,9 +2938,9 @@ toku_test_get_checkpointing_user_data_status (void) {
#undef STATUS_VALUE #undef STATUS_VALUE
#undef PERSISTENT_UPGRADE_STATUS_VALUE #undef PERSISTENT_UPGRADE_STATUS_VALUE
#include <valgrind/drd.h> #include <valgrind/helgrind.h>
void __attribute__((constructor)) toku_ydb_drd_ignore(void); void __attribute__((constructor)) toku_ydb_helgrind_ignore(void);
void void
toku_ydb_drd_ignore(void) { toku_ydb_helgrind_ignore(void) {
DRD_IGNORE_VAR(ydb_layer_status); VALGRIND_HG_DISABLE_CHECKING(&ydb_layer_status, sizeof ydb_layer_status);
} }
...@@ -915,9 +915,9 @@ toku_db_cursor(DB *db, DB_TXN *txn, DBC **c, u_int32_t flags) { ...@@ -915,9 +915,9 @@ toku_db_cursor(DB *db, DB_TXN *txn, DBC **c, u_int32_t flags) {
#undef STATUS_VALUE #undef STATUS_VALUE
#include <valgrind/drd.h> #include <valgrind/helgrind.h>
void __attribute__((constructor)) toku_ydb_cursor_drd_ignore(void); void __attribute__((constructor)) toku_ydb_cursor_helgrind_ignore(void);
void void
toku_ydb_cursor_drd_ignore(void) { toku_ydb_cursor_helgrind_ignore(void) {
DRD_IGNORE_VAR(ydb_c_layer_status); VALGRIND_HG_DISABLE_CHECKING(&ydb_c_layer_status, sizeof ydb_c_layer_status);
} }
...@@ -1155,9 +1155,9 @@ locked_ydb_load_inames(DB_ENV * env, DB_TXN * txn, int N, DB * dbs[N], char * ne ...@@ -1155,9 +1155,9 @@ locked_ydb_load_inames(DB_ENV * env, DB_TXN * txn, int N, DB * dbs[N], char * ne
#undef STATUS_VALUE #undef STATUS_VALUE
#include <valgrind/drd.h> #include <valgrind/helgrind.h>
void __attribute__((constructor)) toku_ydb_db_drd_ignore(void); void __attribute__((constructor)) toku_ydb_db_helgrind_ignore(void);
void void
toku_ydb_db_drd_ignore(void) { toku_ydb_db_helgrind_ignore(void) {
DRD_IGNORE_VAR(ydb_db_layer_status); VALGRIND_HG_DISABLE_CHECKING(&ydb_db_layer_status, sizeof ydb_db_layer_status);
} }
...@@ -830,9 +830,9 @@ toku_ydb_check_avail_fs_space(DB_ENV *env) { ...@@ -830,9 +830,9 @@ toku_ydb_check_avail_fs_space(DB_ENV *env) {
} }
#undef STATUS_VALUE #undef STATUS_VALUE
#include <valgrind/drd.h> #include <valgrind/helgrind.h>
void __attribute__((constructor)) toku_ydb_write_drd_ignore(void); void __attribute__((constructor)) toku_ydb_write_helgrind_ignore(void);
void void
toku_ydb_write_drd_ignore(void) { toku_ydb_write_helgrind_ignore(void) {
DRD_IGNORE_VAR(ydb_write_layer_status); VALGRIND_HG_DISABLE_CHECKING(&ydb_write_layer_status, sizeof ydb_write_layer_status);
} }
...@@ -261,7 +261,8 @@ else ...@@ -261,7 +261,8 @@ else
VGRIND_NOMEM=$(VGRIND_BASE) VGRIND_NOMEM=$(VGRIND_BASE)
endif endif
HGRIND=valgrind --quiet --tool=helgrind --error-exitcode=1 HGRIND=$(VALGRIND) --quiet --tool=helgrind --error-exitcode=1
DRD=$(VALGRIND) --quiet --tool=drd --error-exitcode=1
# When debugging, try: valgrind --show-reachable=yes --leak-check=full ./brt-test # When debugging, try: valgrind --show-reachable=yes --leak-check=full ./brt-test
# When debugging, try: valgrind --show-reachable=yes --leak-check=full ./brt-test # When debugging, try: valgrind --show-reachable=yes --leak-check=full ./brt-test
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment