Commit c2efedaf authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

use icc -ipa-c to build the newbrt code. addresses #1185

git-svn-id: file:///svn/tokudb.1131b+1080a+1185@6331 c7de825b-a66e-492c-adef-691d508d4ae1
parent f85b576a
...@@ -91,6 +91,9 @@ BRT_C_FILES = $(patsubst %,%.c,$(BRT_SOURCES)) ...@@ -91,6 +91,9 @@ BRT_C_FILES = $(patsubst %,%.c,$(BRT_SOURCES))
newbrt.o: $(BRT_C_FILES) $(HFILES) newbrt.o: $(BRT_C_FILES) $(HFILES)
$(CC) -combine $(CFLAGS) $(CPPFLAGS) $(BRT_C_FILES) -c -o $@ $(CC) -combine $(CFLAGS) $(CPPFLAGS) $(BRT_C_FILES) -c -o $@
rfp: $(BRT_C_FILES)
$(CC) $(CPPFLAGS) -Wall -g -O3 -ipo-c $(BRT_C_FILES) -o newbrt.o
tdb_logprint.o: log-internal.h brttypes.h log.h kv-pair.h log_header.h tdb_logprint.o: log-internal.h brttypes.h log.h kv-pair.h log_header.h
tdb_logprint: $(OFILES) tdb_logprint: $(OFILES)
......
...@@ -32,7 +32,7 @@ SHADOW=-Wshadow ...@@ -32,7 +32,7 @@ SHADOW=-Wshadow
FORMAT=-Wmissing-format-attribute FORMAT=-Wmissing-format-attribute
endif endif
CFLAGS = -Wall -Wextra -Wcast-align -Wbad-function-cast -Wmissing-noreturn $(FORMAT) $(OPTFLAGS) -g3 -ggdb3 $(GCOV_FLAGS) $(PROF_FLAGS) -Werror $(FPICFLAGS) $(SHADOW) $(VISIBILITY) CFLAGS = -Wall -Wextra -Wcast-align -Wbad-function-cast -Wmissing-noreturn $(FORMAT) $(OPTFLAGS) -g3 -ggdb3 $(GCOV_FLAGS) $(PROF_FLAGS) $(FPICFLAGS) $(SHADOW) $(VISIBILITY)
LDFLAGS = $(OPTFLAGS) -g $(GCOV_FLAGS) $(PROF_FLAGS) -lpthread -lz LDFLAGS = $(OPTFLAGS) -g $(GCOV_FLAGS) $(PROF_FLAGS) -lpthread -lz
CPPFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_XOPEN_SOURCE=500 -D_GNU_SOURCE -I.. CPPFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_XOPEN_SOURCE=500 -D_GNU_SOURCE -I..
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include "cachetable.h" #include "cachetable.h"
#include "test.h" #include "test.h"
#if 0
// this mutex is used by some of the tests to serialize access to some // this mutex is used by some of the tests to serialize access to some
// global data, especially between the test thread and the cachetable // global data, especially between the test thread and the cachetable
// writeback threads // writeback threads
...@@ -37,6 +38,7 @@ static inline void test_mutex_lock() { ...@@ -37,6 +38,7 @@ static inline void test_mutex_lock() {
static inline void test_mutex_unlock() { static inline void test_mutex_unlock() {
int r = pthread_mutex_unlock(&test_mutex); assert(r == 0); int r = pthread_mutex_unlock(&test_mutex); assert(r == 0);
} }
#endif
// hook my_malloc_always_fails into malloc to control malloc and verify // hook my_malloc_always_fails into malloc to control malloc and verify
// the correct recovery from malloc failures // the correct recovery from malloc failures
...@@ -597,6 +599,8 @@ static void test_size_resize() { ...@@ -597,6 +599,8 @@ static void test_size_resize() {
assert(r == 0); assert(r == 0);
} }
static int min2(int a, int b) { return a < b ? a : b; }
static void test_size_flush() { static void test_size_flush() {
if (verbose) printf("test_size_flush\n"); if (verbose) printf("test_size_flush\n");
...@@ -629,7 +633,6 @@ static void test_size_flush() { ...@@ -629,7 +633,6 @@ static void test_size_flush() {
int n_entries, hash_size; long size_current, size_limit; int n_entries, hash_size; long size_current, size_limit;
toku_cachetable_get_state(t, &n_entries, &hash_size, &size_current, &size_limit); toku_cachetable_get_state(t, &n_entries, &hash_size, &size_current, &size_limit);
int min2(int a, int b) { return a < b ? a : b; }
while (n_entries != min2(i+1, n)) { while (n_entries != min2(i+1, n)) {
pthread_yield(); pthread_yield();
toku_cachetable_get_state(t, &n_entries, 0, 0, 0); toku_cachetable_get_state(t, &n_entries, 0, 0, 0);
......
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