Add mimalloc-bench submodule and simplify larson_hakmem build
Changes: - Add mimalloc-bench as git submodule for Larson benchmark source - Simplify Makefile: Remove shim layer (hakmem.o provides malloc/free directly) - Enable larson.sh script to build and run Larson benchmarks This allows running: ./scripts/larson.sh hakmem --profile tinyhot_tput 2 4
This commit is contained in:
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
[submodule "mimalloc-bench"]
|
||||
path = mimalloc-bench
|
||||
url = https://github.com/daanx/mimalloc-bench.git
|
||||
11
Makefile
11
Makefile
@ -328,14 +328,11 @@ larson_mi.o: $(LARSON_SRC)
|
||||
larson_mi: larson_mi.o
|
||||
$(CXX) -o $@ $^ -L mimalloc-bench/extern/mi/out/release -lmimalloc $(LDFLAGS)
|
||||
|
||||
# HAKMEM variant (override malloc/free to our front via shim, link core)
|
||||
bench_larson_hakmem_shim.o: bench_larson_hakmem_shim.c bench/larson_hakmem_shim.h
|
||||
$(CC) $(CFLAGS) -I core -c -o $@ $<
|
||||
# HAKMEM variant (hakmem.o provides malloc/free symbols directly)
|
||||
larson_hakmem.o: $(LARSON_SRC)
|
||||
$(CXX) $(CFLAGS) -I core -c -o $@ $<
|
||||
|
||||
larson_hakmem.o: $(LARSON_SRC) bench/larson_hakmem_shim.h
|
||||
$(CXX) $(CFLAGS) -I core -include bench/larson_hakmem_shim.h -c -o $@ $<
|
||||
|
||||
larson_hakmem: larson_hakmem.o bench_larson_hakmem_shim.o $(TINY_BENCH_OBJS)
|
||||
larson_hakmem: larson_hakmem.o $(TINY_BENCH_OBJS)
|
||||
$(CXX) -o $@ $^ $(LDFLAGS)
|
||||
|
||||
test_mf2: test_mf2.o $(TINY_BENCH_OBJS)
|
||||
|
||||
1
mimalloc-bench
Submodule
1
mimalloc-bench
Submodule
Submodule mimalloc-bench added at 6ec12891f8
Reference in New Issue
Block a user