cache_test doesn't need sharedlib anymore
This commit is contained in:
parent
71425ba3e5
commit
3799317456
@ -19,4 +19,5 @@ target_link_libraries(recv sharedlib)
|
||||
|
||||
# add the cache-test executable
|
||||
add_executable(cache_test cache_test.c lib.c lib.h)
|
||||
target_link_libraries(cache_test sharedlib)
|
||||
# link sharedlib if you want to test on the padded addr (less chance for noise)
|
||||
# target_link_libraries(cache_test sharedlib)
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include "lib.h"
|
||||
#include "sharedlib.h"
|
||||
|
||||
#define NUM_ACCESSES 1000000
|
||||
|
||||
@ -45,7 +44,8 @@ int main()
|
||||
return 1;
|
||||
}
|
||||
|
||||
measure_multiple_accesses((void*) function, NUM_ACCESSES, hits, misses);
|
||||
// We use the addr. of main for our test, but anything works.
|
||||
measure_multiple_accesses((void*) main, NUM_ACCESSES, hits, misses);
|
||||
|
||||
size_t threshold = find_crossover_point(hits, misses, NUM_ACCESSES);
|
||||
printf("Suggested threshold: %zu\n", threshold);
|
||||
@ -53,4 +53,4 @@ int main()
|
||||
free(hits);
|
||||
free(misses);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user