Commit 0f8b5dcf authored by Yoni Fogel's avatar Yoni Fogel

add VTUNE=1 option for profiling in windows

git-svn-id: file:///svn/toku/tokudb@9634 c7de825b-a66e-492c-adef-691d508d4ae1
parent fc897e6a
...@@ -89,11 +89,11 @@ OFILES = \ ...@@ -89,11 +89,11 @@ OFILES = \
#end #end
$(TARGET_TDB): db-benchmark-test.c $(TARGET_TDB): db-benchmark-test.c
$(CC) $< $(BIN_FROM_C_FLAGS) $(OFILES) $(CC) $< $(BIN_FROM_C_FLAGS) $(OFILES) $(LINK_MUST_BE_LAST)
$(SCANSCAN_TDB): scanscan.c $(SCANSCAN_TDB): scanscan.c
$(CC) $< $(BIN_FROM_C_FLAGS) $(OFILES) $(CC) $< $(BIN_FROM_C_FLAGS) $(OFILES) $(LINK_MUST_BE_LAST)
$(SCANRACE_TDB): scanrace.c $(SCANRACE_TDB): scanrace.c
$(CC) $< $(BIN_FROM_C_FLAGS) $(OFILES) $(CC) $< $(BIN_FROM_C_FLAGS) $(OFILES) $(LINK_MUST_BE_LAST)
else else
$(TARGET_TDB) $(SCANSCAN_TDB) $(SCANRACE_TDB): DLINK_FILES=$(TDB_DLINK_FILES) $(TARGET_TDB) $(SCANSCAN_TDB) $(SCANRACE_TDB): DLINK_FILES=$(TDB_DLINK_FILES)
...@@ -106,11 +106,11 @@ $(TARGET_TDB) $(SCANSCAN_TDB) $(SCANRACE_TDB): $(TOKUDB) ...@@ -106,11 +106,11 @@ $(TARGET_TDB) $(SCANSCAN_TDB) $(SCANRACE_TDB): $(TOKUDB)
endif endif
$(TARGET_TDB) $(SCANSCAN_TDB) $(SCANRACE_TDB): RPATH_DIRS=$(dir $(TDB_DLINK_FILES)) $(TARGET_TDB) $(SCANSCAN_TDB) $(SCANRACE_TDB): RPATH_DIRS=$(dir $(TDB_DLINK_FILES))
$(TARGET_TDB): db-benchmark-test.c $(TARGET_TDB): db-benchmark-test.c
$(CC) $< $(BIN_FROM_C_FLAGS) $(CC) $< $(BIN_FROM_C_FLAGS) $(LINK_MUST_BE_LAST)
$(SCANSCAN_TDB): scanscan.c $(SCANSCAN_TDB): scanscan.c
$(CC) $< $(BIN_FROM_C_FLAGS) $(CC) $< $(BIN_FROM_C_FLAGS) $(LINK_MUST_BE_LAST)
$(SCANRACE_TDB): scanrace.c $(SCANRACE_TDB): scanrace.c
$(CC) $< $(BIN_FROM_C_FLAGS) $(CC) $< $(BIN_FROM_C_FLAGS) $(LINK_MUST_BE_LAST)
endif endif
$(TARGET_BDB): db-benchmark-test.c $(TARGET_BDB): db-benchmark-test.c
......
...@@ -96,7 +96,7 @@ log_header.h log_code.c: logformat$(BINSUF) ...@@ -96,7 +96,7 @@ log_header.h log_code.c: logformat$(BINSUF)
./logformat ./logformat
#Needs to be done manually since it does not include newbrt. #Needs to be done manually since it does not include newbrt.
logformat$(BINSUF): logformat.c $(LIBPORTABILITY) logformat$(BINSUF): logformat.c $(LIBPORTABILITY)
$(CC) $< $(BIN_FROM_O_FLAGS_NOLIB) $(LIBPORTABILITY) $(CC) $< $(BIN_FROM_O_FLAGS_NOLIB) $(LIBPORTABILITY) $(LINK_MUST_BE_LAST)
libs: $(NEWBRT) $(NEWBRT_BUNDLE) libs: $(NEWBRT) $(NEWBRT_BUNDLE)
......
...@@ -59,13 +59,13 @@ A_TLOG =$(LOCKTREE_TLOG) $(RANGETREE_TLOG) ...@@ -59,13 +59,13 @@ A_TLOG =$(LOCKTREE_TLOG) $(RANGETREE_TLOG)
A_LOG =$(LOCKTREE_LOG) $(RANGETREE_LOG) A_LOG =$(LOCKTREE_LOG) $(RANGETREE_LOG)
%.lin$(BINSUF): %.c $(DEPEND_COMPILE) $(DEPEND_LINK) $(A_LINEAR) %.lin$(BINSUF): %.c $(DEPEND_COMPILE) $(DEPEND_LINK) $(A_LINEAR)
$(CC) -DTESTDIR=\"dir.$<.lin\" $< $(A_LINEAR) $(BIN_FROM_C_FLAGS) $(CC) -DTESTDIR=\"dir.$<.lin\" $< $(A_LINEAR) $(BIN_FROM_C_FLAGS) $(LINK_MUST_BE_LAST)
%.tlog$(BINSUF): %.c $(DEPEND_COMPILE) $(DEPEND_LINK) $(A_TLOG) %.tlog$(BINSUF): %.c $(DEPEND_COMPILE) $(DEPEND_LINK) $(A_TLOG)
$(CC) -DTESTDIR=\"dir.$<.tlog\" $< $(A_TLOG) $(BIN_FROM_C_FLAGS) -DTOKU_RT_NOOVERLAPS $(CC) -DTESTDIR=\"dir.$<.tlog\" $< $(A_TLOG) $(BIN_FROM_C_FLAGS) -DTOKU_RT_NOOVERLAPS $(LINK_MUST_BE_LAST)
%.log$(BINSUF): %.c $(DEPEND_COMPILE) $(DEPEND_LINK) $(A_LOG) %.log$(BINSUF): %.c $(DEPEND_COMPILE) $(DEPEND_LINK) $(A_LOG)
$(CC) -DTESTDIR=\"dir.$<.log\" $< $(A_LOG) $(BIN_FROM_C_FLAGS) $(CC) -DTESTDIR=\"dir.$<.log\" $< $(A_LOG) $(BIN_FROM_C_FLAGS) $(LINK_MUST_BE_LAST)
clean: clean:
rm -f $(ALL_TESTS) rm -f $(ALL_TESTS)
......
...@@ -58,13 +58,13 @@ A_TLOG =$(RANGETREE_TLOG) ...@@ -58,13 +58,13 @@ A_TLOG =$(RANGETREE_TLOG)
A_LOG =$(RANGETREE_LOG) A_LOG =$(RANGETREE_LOG)
%.lin$(BINSUF): %.c $(DEPEND_COMPILE) $(DEPEND_LINK) $(A_LINEAR) %.lin$(BINSUF): %.c $(DEPEND_COMPILE) $(DEPEND_LINK) $(A_LINEAR)
$(CC) -DTESTDIR=\"dir.$<.lin\" $< $(A_LINEAR) $(BIN_FROM_C_FLAGS) $(CC) -DTESTDIR=\"dir.$<.lin\" $< $(A_LINEAR) $(BIN_FROM_C_FLAGS) $(LINK_MUST_BE_LAST)
%.tlog$(BINSUF): %.c $(DEPEND_COMPILE) $(DEPEND_LINK) $(A_TLOG) %.tlog$(BINSUF): %.c $(DEPEND_COMPILE) $(DEPEND_LINK) $(A_TLOG)
$(CC) -DTESTDIR=\"dir.$<.tlog\" $< $(A_TLOG) $(BIN_FROM_C_FLAGS) -DTOKU_RT_NOOVERLAPS $(CC) -DTESTDIR=\"dir.$<.tlog\" $< $(A_TLOG) $(BIN_FROM_C_FLAGS) -DTOKU_RT_NOOVERLAPS $(LINK_MUST_BE_LAST)
%.log$(BINSUF): %.c $(DEPEND_COMPILE) $(DEPEND_LINK) $(A_LOG) %.log$(BINSUF): %.c $(DEPEND_COMPILE) $(DEPEND_LINK) $(A_LOG)
$(CC) -DTESTDIR=\"dir.$<.log\" $< $(A_LOG) $(BIN_FROM_C_FLAGS) $(CC) -DTESTDIR=\"dir.$<.log\" $< $(A_LOG) $(BIN_FROM_C_FLAGS) $(LINK_MUST_BE_LAST)
clean: clean:
rm -f $(ALL_TESTS) rm -f $(ALL_TESTS)
......
...@@ -167,7 +167,7 @@ endif ...@@ -167,7 +167,7 @@ endif
%.bdb$(BINSUF): CFLAGS+= -DENVDIR=\"dir.$<.bdb\" -DUSE_BDB -DIS_TDB=0 %.bdb$(BINSUF): CFLAGS+= -DENVDIR=\"dir.$<.bdb\" -DUSE_BDB -DIS_TDB=0
%.bdb$(BINSUF): %.c $(DEPEND_COMPILE) $(DEPEND_LINK) %.bdb$(BINSUF): %.c $(DEPEND_COMPILE) $(DEPEND_LINK)
$(CC) $< $(BIN_FROM_C_FLAGS) $(CC) $< $(BIN_FROM_C_FLAGS) $(LINK_MUST_BE_LAST)
TDB_EXTRA_NEEDED= TDB_EXTRA_NEEDED=
ifeq ($(CYGWIN),) ifeq ($(CYGWIN),)
...@@ -190,7 +190,7 @@ endif ...@@ -190,7 +190,7 @@ endif
%.tdb$(BINSUF) %.tdbt$(BINSUF): CPPFLAGS+=-I$(TOKUROOT)include %.tdb$(BINSUF) %.tdbt$(BINSUF): CPPFLAGS+=-I$(TOKUROOT)include
%.tdb$(BINSUF) %.tdbt$(BINSUF): %.c $(DEPEND_COMPILE) $(DEPEND_LINK) $(TDB_EXTRA_NEEDED) %.tdb$(BINSUF) %.tdbt$(BINSUF): %.c $(DEPEND_COMPILE) $(DEPEND_LINK) $(TDB_EXTRA_NEEDED)
$(CC) $< $(filter-out ../../lib/libtokuportability.a,$(BIN_FROM_C_FLAGS)) $(CC) $< $(filter-out ../../lib/libtokuportability.a,$(BIN_FROM_C_FLAGS)) $(LINK_MUST_BE_LAST)
clean: clean:
rm -f $(ALL_TESTS) rm -f $(ALL_TESTS)
......
...@@ -45,6 +45,12 @@ ifeq ($(DEBUG),) ...@@ -45,6 +45,12 @@ ifeq ($(DEBUG),)
DEBUG = 0 DEBUG = 0
endif endif
ifeq ($(VTUNE),1)
LINK_MUST_BE_LAST = /link /fixed:no
else
LINK_MUST_BE_LAST =
endif
.DELETE_ON_ERROR: .DELETE_ON_ERROR:
ifneq ($(GCOV),) ifneq ($(GCOV),)
...@@ -363,12 +369,12 @@ endif ...@@ -363,12 +369,12 @@ endif
BIN_FROM_C_FLAGS =$(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(BINOUTPUT)$@ BIN_FROM_C_FLAGS =$(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(BINOUTPUT)$@
BIN_FROM_C_FLAGS_NOLIB=$(CFLAGS) $(CPPFLAGS) $(LDFLAGS_NOLIB) $(BINOUTPUT)$@ BIN_FROM_C_FLAGS_NOLIB=$(CFLAGS) $(CPPFLAGS) $(LDFLAGS_NOLIB) $(BINOUTPUT)$@
%$(BINSUF):%.c $(DEPEND_COMPILE) $(DEPEND_LINK) %$(BINSUF):%.c $(DEPEND_COMPILE) $(DEPEND_LINK)
$(CC) $< $(BIN_FROM_C_FLAGS) $(CC) $< $(BIN_FROM_C_FLAGS) $(LINK_MUST_BE_LAST)
BIN_FROM_O_FLAGS =$(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(BINOUTPUT)$@ BIN_FROM_O_FLAGS =$(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(BINOUTPUT)$@
BIN_FROM_O_FLAGS_NOLIB=$(CFLAGS) $(CPPFLAGS) $(LDFLAGS_NOLIB) $(BINOUTPUT)$@ BIN_FROM_O_FLAGS_NOLIB=$(CFLAGS) $(CPPFLAGS) $(LDFLAGS_NOLIB) $(BINOUTPUT)$@
%$(BINSUF):%.$(OEXT) $(DEPEND_COMPILE) $(DEPEND_LINK) %$(BINSUF):%.$(OEXT) $(DEPEND_COMPILE) $(DEPEND_LINK)
$(CC) $< $(BIN_FROM_O_FLAGS) $(CC) $< $(BIN_FROM_O_FLAGS) $(LINK_MUST_BE_LAST)
%.$(OEXT):%.c $(DEPEND_COMPILE) %.$(OEXT):%.c $(DEPEND_COMPILE)
$(CC) $< -c $(CPPFLAGS) $(CFLAGS) $(OOUTPUT)$@ $(CC) $< -c $(CPPFLAGS) $(CFLAGS) $(OOUTPUT)$@
......
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