From a8abdf7b110727b1ed314d726137399b0a624ead Mon Sep 17 00:00:00 2001 From: Akilan Date: Sat, 16 Aug 2025 13:05:42 +0100 Subject: [PATCH] test whole program --- benchmarks/benchmarks/StressTestMalloc/memaccesstest.c | 8 ++++---- benchmarks/benchmarks/StressTestMalloc/memaccesstest.sh | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/benchmarks/benchmarks/StressTestMalloc/memaccesstest.c b/benchmarks/benchmarks/StressTestMalloc/memaccesstest.c index 2ef46e4..7693bab 100644 --- a/benchmarks/benchmarks/StressTestMalloc/memaccesstest.c +++ b/benchmarks/benchmarks/StressTestMalloc/memaccesstest.c @@ -20,8 +20,8 @@ All rights reserved. #include "malloc.h" -#define malloc MALLOCCHERI -#define free FREECHERI +// #define malloc MALLOCCHERI +// #define free FREECHERI @@ -267,7 +267,7 @@ void * walk(void *param) int main(int argc,char **argv) { clock_t tic = clock(); -INITREGULARALLOC(); +// INITREGULARALLOC(); //#ifdef DEBUG printf("DEBUG:sizeof(struct l)=%ld\n",sizeof(struct l)); // #endif @@ -316,7 +316,7 @@ printf("Elapsed build get here before ll: %f seconds\n", (double)(toc - tic) / C tdata->root=root; tdata->working_set_size=working_set_size; clock_t tic2 = clock(); - for (int i = 0; i < 16000; i++) { + for (int i = 0; i < 32000; i++) { walk((void*)tdata); } clock_t toc2 = clock(); diff --git a/benchmarks/benchmarks/StressTestMalloc/memaccesstest.sh b/benchmarks/benchmarks/StressTestMalloc/memaccesstest.sh index 9ece19d..e663370 100644 --- a/benchmarks/benchmarks/StressTestMalloc/memaccesstest.sh +++ b/benchmarks/benchmarks/StressTestMalloc/memaccesstest.sh @@ -1,5 +1,5 @@ # sh build.sh -# LD_PRELOAD=./libjemalloc.so time pmcstat -d -w 1 -p l1d_tlb_rd -p l2d_tlb_rd -p l1d_tlb_refill -p cpu_cycles -p dtlb_walk -p stall_backend -p ll_cache_miss_rd -o memaccesstest-cheri-8000.stat ./memaccesstest.out -# LD_PRELOAD=./regularjemalloc.so time pmcstat -d -w 1 -p l1d_tlb_rd -p l2d_tlb_rd -p l1d_tlb_refill -p cpu_cycles -p dtlb_walk -p stall_backend -p ll_cache_miss_rd -o memaccesstest-regular-8000.stat ./memaccesstest.out +LD_PRELOAD=/home/akilan/Alloc-Test/Reverse/CHERI-Allocator/bin/libjemalloc.so time pmcstat -d -w 1 -p l1d_tlb_rd -p l2d_tlb_rd -p l1d_tlb_refill -p cpu_cycles -p dtlb_walk -p stall_backend -p ll_cache_miss_rd -o memaccesstest-cheri-32000.stat ./memaccesstest.out +LD_PRELOAD=/home/akilan/Alloc-Test/Reverse/CHERI-Allocator/bin/regularjemalloc.so time pmcstat -d -w 1 -p l1d_tlb_rd -p l2d_tlb_rd -p l1d_tlb_refill -p cpu_cycles -p dtlb_walk -p stall_backend -p ll_cache_miss_rd -o memaccesstest-regular-32000.stat ./memaccesstest.out -time pmcstat -d -w 1 -p l1d_tlb_rd -p l2d_tlb_rd -p l1d_tlb_refill -p cpu_cycles -p dtlb_walk -p stall_backend -p ll_cache_miss_rd -o memaccesstest-huge-alloc-16000.stat ./memaccesstest.out \ No newline at end of file +# time pmcstat -d -w 1 -p l1d_tlb_rd -p l2d_tlb_rd -p l1d_tlb_refill -p cpu_cycles -p dtlb_walk -p stall_backend -p ll_cache_miss_rd -o memaccesstest-huge-alloc-16000.stat ./memaccesstest.out \ No newline at end of file