saving current changes

This commit is contained in:
2025-05-28 15:51:01 +01:00
parent da1b32e66c
commit f3401de543
34 changed files with 2497 additions and 517 deletions

BIN
benchmarks/.DS_Store vendored

Binary file not shown.

Binary file not shown.

View File

@@ -1,9 +1,10 @@
#define NPAD 7
#define MIN_WSS sizeof(struct l)
#ifdef __MACH__
#define MAX_WSS 4294967296 //2^31
#else
#define MAX_WSS 8589934592 //2^32
#endif
#define MAX_WSS 429496729
// #ifdef __MACH__
// #define MAX_WSS 4294967296 //2^31
// #else
// #define MAX_WSS 8589934592 //2^32
// #endif
#define NTHREADS 0

View File

@@ -207,10 +207,10 @@ main (int argc, char **argv)
// bench (size);
bench (2*size);
//bench (4*size);
// bench (4*size);
//bench (8*size);
// bench (16*size);
// bench (32*size);
//bench (32*size);
return 0;
}

View File

@@ -266,10 +266,11 @@ void * walk(void *param)
int main(int argc,char **argv)
{
clock_t tic = clock();
// INITREGULARALLOC();
#ifdef DEBUG
//#ifdef DEBUG
printf("DEBUG:sizeof(struct l)=%ld\n",sizeof(struct l));
#endif
// #endif
struct l *root;
unsigned long working_set_size;
int i;
@@ -285,11 +286,16 @@ int main(int argc,char **argv)
#ifdef DEBUG
printf("DEBUG:Working set size=%ld elements=%ld\n",working_set_size,working_set_size/sizeof(struct l));
#endif
clock_t toc = clock();
printf("Elapsed build get here before ll: %f seconds\n", (double)(toc - tic) / CLOCKS_PER_SEC);
#ifdef RANDOM_LIST
build_random_ll(root, working_set_size);
#else
build_sequencial_ll(root, working_set_size);
clock_t tic1 = clock();
build_sequencial_ll(root, working_set_size);
// build_sequencial_ll(root, working_set_size);
clock_t toc1 = clock();
printf("Elapsed build ll: %f seconds\n", (double)(toc1 - tic1) / CLOCKS_PER_SEC);
#endif
#if NTHREADS>0
@@ -309,11 +315,17 @@ int main(int argc,char **argv)
tdata->thread_index=0;
tdata->root=root;
tdata->working_set_size=working_set_size;
walk((void*)tdata);
clock_t tic2 = clock();
for (int i = 0; i < 8000; i++) {
walk((void*)tdata);
}
clock_t toc2 = clock();
printf("Elapsed build walk: %f seconds\n", (double)(toc2 - tic2) / CLOCKS_PER_SEC);
#endif
}
printf("-----------------------------------------------");
// free(root);

View File

@@ -1,3 +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.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.stat ./memaccesstest.out
# 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
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-alloc-8000.stat ./memaccesstest.out