diff --git a/db-benchmark-test/Makefile b/db-benchmark-test/Makefile index de2a4687172..8f9e23b7f7d 100644 --- a/db-benchmark-test/Makefile +++ b/db-benchmark-test/Makefile @@ -8,7 +8,7 @@ BENCHDBS = bench.bdb/ bench.tokudb OPTFLAGS = -O2 -CFLAGS = -Wall -Werror -g $(OPTFLAGS) $(GCOV_FLAGS) +CFLAGS = -Wall -Werror -g $(OPTFLAGS) $(GCOV_FLAGS) $(PROF_FLAGS) # CFLAGS += -pg ifdef BDBDIR diff --git a/db-benchmark-test/db-benchmark-test.c b/db-benchmark-test/db-benchmark-test.c index a8741b0982c..9dbf6fae9a4 100644 --- a/db-benchmark-test/db-benchmark-test.c +++ b/db-benchmark-test/db-benchmark-test.c @@ -121,7 +121,7 @@ void long_long_to_array (unsigned char *a, unsigned long long l) { a[i] = (l>>(56-8*i))&0xff; } -DBT *toku_fill_dbt(DBT *dbt, const void *data, int size) { +DBT *fill_dbt(DBT *dbt, const void *data, int size) { memset(dbt, 0, sizeof *dbt); dbt->size = size; dbt->data = (void *) data; @@ -135,7 +135,7 @@ void insert (long long v) { long_long_to_array(kc, v); memset(vc, 0, sizeof vc); long_long_to_array(vc, v); - int r = db->put(db, tid, toku_fill_dbt(&kt, kc, keysize), toku_fill_dbt(&vt, vc, valsize), DB_YESOVERWRITE); + int r = db->put(db, tid, fill_dbt(&kt, kc, keysize), fill_dbt(&vt, vc, valsize), DB_YESOVERWRITE); CKERR(r); if (do_transactions) { if (n_insertions_since_txn_began>=items_per_transaction) { @@ -154,7 +154,7 @@ void serial_insert_from (long long from) { int r = dbenv->txn_begin(dbenv, 0, &tid, 0); assert(r==0); { DBT k,v; - r=db->put(db, tid, toku_fill_dbt(&k, "a", 1), toku_fill_dbt(&v, "b", 1), DB_YESOVERWRITE); + r=db->put(db, tid, fill_dbt(&k, "a", 1), fill_dbt(&v, "b", 1), DB_YESOVERWRITE); CKERR(r); } diff --git a/src/Makefile b/src/Makefile index 41894bd5733..e5d29fe92cd 100644 --- a/src/Makefile +++ b/src/Makefile @@ -6,13 +6,14 @@ LIBNAME=libtokudb EXPORTMAP = -Wl,--version-script=export.map VISIBILITY = -fvisibility=hidden +# PROF_FLAGS=-pg OPTFLAGS = -O2 # GCOV_FLAGS = -fprofile-arcs -ftest-coverage CFLAGS = -W -Wall -Wextra -Werror -g3 -ggdb3 -fPIC $(OPTFLAGS) $(GCOV_FLAGS) CFLAGS += -Wbad-function-cast -Wcast-align -Waggregate-return CPPFLAGS = -I../include -I../newbrt -I./lock_tree/ -I./range_tree/ CPPFLAGS += -D_GNU_SOURCE -D_THREAD_SAFE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -CFLAGS+= $(VISIBILITY) +CFLAGS+= $(VISIBILITY) $(PROF_FLAGS) ifneq ($(OSX),) diff --git a/src/lock_tree/Makefile b/src/lock_tree/Makefile index 83a4508f52b..533efed0fa6 100644 --- a/src/lock_tree/Makefile +++ b/src/lock_tree/Makefile @@ -14,7 +14,7 @@ VISIBILITY = -fvisibility=hidden CFLAGS = -W -Wall -Wextra -Werror -fPIC $(OPTFLAGS) -g3 -ggdb3 $(GCOV_FLAGS) CFLAGS += -Wbad-function-cast -Wcast-align -Wconversion -Waggregate-return CFLAGS += -Wmissing-noreturn -Wmissing-format-attribute -CFLAGS += $(VISIBILITY) +CFLAGS += $(VISIBILITY) $(PROF_FLAGS) CPPFLAGS = -I. -I.. -I../range_tree -I../../include -I../../newbrt -L../range_tree CPPFLAGS += -D_GNU_SOURCE -D_THREAD_SAFE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE diff --git a/src/range_tree/Makefile b/src/range_tree/Makefile index 6a734e3ce3d..6b08489ee97 100644 --- a/src/range_tree/Makefile +++ b/src/range_tree/Makefile @@ -18,7 +18,7 @@ CFLAGS += -Wbad-function-cast -Wcast-align -Wconversion -Waggregate-return CFLAGS += -Wmissing-noreturn -Wmissing-format-attribute CPPFLAGS = -I. -I../../include -I../../newbrt CPPFLAGS += -D_GNU_SOURCE -D_THREAD_SAFE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -CFLAGS += $(VISIBILITY) +CFLAGS += $(VISIBILITY) $(PROF_FLAGS) ifneq ($(OSX),) CFLAGS+=-fno-common