mirror of
https://github.com/MariaDB/server.git
synced 2025-11-30 05:23:50 +03:00
All the makefiles should honor {{{PROF_FLAGS}}}. Make db-benchmark-test statically linkable by removing the conflict with {{{toku_fill_dbt}}}. Although gprof still doesn't work with dynamically linked libraries, we can statically link it and get useful info. Closes #515.
git-svn-id: file:///svn/tokudb@2755 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
BENCHDBS = bench.bdb/ bench.tokudb
|
BENCHDBS = bench.bdb/ bench.tokudb
|
||||||
|
|
||||||
OPTFLAGS = -O2
|
OPTFLAGS = -O2
|
||||||
CFLAGS = -Wall -Werror -g $(OPTFLAGS) $(GCOV_FLAGS)
|
CFLAGS = -Wall -Werror -g $(OPTFLAGS) $(GCOV_FLAGS) $(PROF_FLAGS)
|
||||||
# CFLAGS += -pg
|
# CFLAGS += -pg
|
||||||
|
|
||||||
ifdef BDBDIR
|
ifdef BDBDIR
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ void long_long_to_array (unsigned char *a, unsigned long long l) {
|
|||||||
a[i] = (l>>(56-8*i))&0xff;
|
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);
|
memset(dbt, 0, sizeof *dbt);
|
||||||
dbt->size = size;
|
dbt->size = size;
|
||||||
dbt->data = (void *) data;
|
dbt->data = (void *) data;
|
||||||
@@ -135,7 +135,7 @@ void insert (long long v) {
|
|||||||
long_long_to_array(kc, v);
|
long_long_to_array(kc, v);
|
||||||
memset(vc, 0, sizeof vc);
|
memset(vc, 0, sizeof vc);
|
||||||
long_long_to_array(vc, v);
|
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);
|
CKERR(r);
|
||||||
if (do_transactions) {
|
if (do_transactions) {
|
||||||
if (n_insertions_since_txn_began>=items_per_transaction) {
|
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);
|
int r = dbenv->txn_begin(dbenv, 0, &tid, 0); assert(r==0);
|
||||||
{
|
{
|
||||||
DBT k,v;
|
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);
|
CKERR(r);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,13 +6,14 @@ LIBNAME=libtokudb
|
|||||||
EXPORTMAP = -Wl,--version-script=export.map
|
EXPORTMAP = -Wl,--version-script=export.map
|
||||||
VISIBILITY = -fvisibility=hidden
|
VISIBILITY = -fvisibility=hidden
|
||||||
|
|
||||||
|
# PROF_FLAGS=-pg
|
||||||
OPTFLAGS = -O2
|
OPTFLAGS = -O2
|
||||||
# GCOV_FLAGS = -fprofile-arcs -ftest-coverage
|
# GCOV_FLAGS = -fprofile-arcs -ftest-coverage
|
||||||
CFLAGS = -W -Wall -Wextra -Werror -g3 -ggdb3 -fPIC $(OPTFLAGS) $(GCOV_FLAGS)
|
CFLAGS = -W -Wall -Wextra -Werror -g3 -ggdb3 -fPIC $(OPTFLAGS) $(GCOV_FLAGS)
|
||||||
CFLAGS += -Wbad-function-cast -Wcast-align -Waggregate-return
|
CFLAGS += -Wbad-function-cast -Wcast-align -Waggregate-return
|
||||||
CPPFLAGS = -I../include -I../newbrt -I./lock_tree/ -I./range_tree/
|
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
|
CPPFLAGS += -D_GNU_SOURCE -D_THREAD_SAFE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
|
||||||
CFLAGS+= $(VISIBILITY)
|
CFLAGS+= $(VISIBILITY) $(PROF_FLAGS)
|
||||||
|
|
||||||
|
|
||||||
ifneq ($(OSX),)
|
ifneq ($(OSX),)
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ VISIBILITY = -fvisibility=hidden
|
|||||||
CFLAGS = -W -Wall -Wextra -Werror -fPIC $(OPTFLAGS) -g3 -ggdb3 $(GCOV_FLAGS)
|
CFLAGS = -W -Wall -Wextra -Werror -fPIC $(OPTFLAGS) -g3 -ggdb3 $(GCOV_FLAGS)
|
||||||
CFLAGS += -Wbad-function-cast -Wcast-align -Wconversion -Waggregate-return
|
CFLAGS += -Wbad-function-cast -Wcast-align -Wconversion -Waggregate-return
|
||||||
CFLAGS += -Wmissing-noreturn -Wmissing-format-attribute
|
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 = -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
|
CPPFLAGS += -D_GNU_SOURCE -D_THREAD_SAFE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ CFLAGS += -Wbad-function-cast -Wcast-align -Wconversion -Waggregate-return
|
|||||||
CFLAGS += -Wmissing-noreturn -Wmissing-format-attribute
|
CFLAGS += -Wmissing-noreturn -Wmissing-format-attribute
|
||||||
CPPFLAGS = -I. -I../../include -I../../newbrt
|
CPPFLAGS = -I. -I../../include -I../../newbrt
|
||||||
CPPFLAGS += -D_GNU_SOURCE -D_THREAD_SAFE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
|
CPPFLAGS += -D_GNU_SOURCE -D_THREAD_SAFE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
|
||||||
CFLAGS += $(VISIBILITY)
|
CFLAGS += $(VISIBILITY) $(PROF_FLAGS)
|
||||||
|
|
||||||
ifneq ($(OSX),)
|
ifneq ($(OSX),)
|
||||||
CFLAGS+=-fno-common
|
CFLAGS+=-fno-common
|
||||||
|
|||||||
Reference in New Issue
Block a user