diff options
| -rw-r--r-- | Makefile | 21 | ||||
| -rwxr-xr-x | bench.py | 3 | ||||
| -rw-r--r-- | benchmarks/bench_conprod.c (renamed from bench_conprod.c) | 0 | ||||
| -rw-r--r-- | benchmarks/bench_loop.c (renamed from bench_loop.c) | 0 | ||||
| -rw-r--r-- | common_targets.py | 4 |
5 files changed, 20 insertions, 8 deletions
@@ -2,8 +2,9 @@ .DEFAULT_GOAL = all -C_SOURCES = $(shell find . -name "*.c") -CC_SOURCES = $(shell find . -name "*.cc") +SRCDIR=benchmarks +C_SOURCES = $(shell find $(SRCDIR) -name "*.c") +CC_SOURCES = $(shell find $(SRCDIR) -name "*.cc") VERBOSE = OBJDIR = ./build @@ -26,11 +27,19 @@ OBJECTS = $(notdir $(CC_SOURCES:.cc=.o)) $(notdir $(C_SOURCES:.c=.o)) OBJPRE = $(addprefix $(OBJDIR)/,$(OBJECTS)) MAKEFILE_LIST = Makefile -all: $(OBJDIR)/bench_loop $(OBJDIR)/bench_conprod +TARGETS = $(OBJPRE:.o=) -bench: all - @if test \( ! \( -d bench.d \) \) ;then mkdir -p bench.d;fi - bash -c "./bench.py" +all: $(TARGETS) + +$(OBJDIR)/cache-thrash: $(OBJDIR)/cache-thrash.o + @echo "ld $@" + @if test \( ! \( -d $(@D) \) \) ;then mkdir -p $(@D);fi + $(VERBOSE) $(CXX) -pthread -o $@ $^ + +$(OBJDIR)/cache-scratch: $(OBJDIR)/cache-scratch.o + @echo "ld $@" + @if test \( ! \( -d $(@D) \) \) ;then mkdir -p $(@D);fi + $(VERBOSE) $(CXX) -pthread -o $@ $^ $(OBJDIR)/bench_conprod: $(OBJDIR)/bench_conprod.o @echo "ld $@" @@ -2,6 +2,7 @@ import argparse +from falsesharing import falsesharing from loop import loop # from bench_conprod import conprod from mysql import mysql @@ -14,7 +15,7 @@ parser.add_argument("-v", "--verbose", help="more output", action='store_true') parser.add_argument("-b", "--benchmarks", help="benchmarks to run", nargs='+') -benchmarks = [loop, mysql] +benchmarks = [loop, mysql, falsesharing] def main(): args = parser.parse_args() diff --git a/bench_conprod.c b/benchmarks/bench_conprod.c index 3b349ce..3b349ce 100644 --- a/bench_conprod.c +++ b/benchmarks/bench_conprod.c diff --git a/bench_loop.c b/benchmarks/bench_loop.c index b1c8d13..b1c8d13 100644 --- a/bench_loop.c +++ b/benchmarks/bench_loop.c diff --git a/common_targets.py b/common_targets.py index 177168b..1fd6af3 100644 --- a/common_targets.py +++ b/common_targets.py @@ -1,3 +1,5 @@ common_targets = {"klmalloc" : ("", "targets/libklmalloc.so"), "libc" : ("", ""), # libc - "tcmalloc" : ("", "targets/libtcmalloc.so")} + "tcmalloc" : ("", "targets/libtcmalloc.so"), + "jemalloc" : ("", "targets/libjemalloc.so"), + "hoard" : ("", "targets/libhoard.so")} |
