| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Last updated: 2020-10-14
Cache simulation in order to obtain performance metrics
Code baseline for IE0521 cache simulation project on Ubutu 14.04
Make sure gtest is install:
$ sudo apt-get update $ sudo apt-get install libgtest-dev $ sudo apt-get install cmake # install cmake $ cd /usr/src/gtest $ sudo cmake CMakeLists.txt $ sudo make
See https://cit.dixie.edu/faculty/larsen/google-test-installation.php for more information
Create a build directory and run all targets there:
>> mkdir build >> cd build >> cmake .. >> make <target> (cache or cachetest)
The simulation executable is located inside the build directory (src/cache). All commands are executed within Cache-Performance Simulation, the rest of the relative paths have already been considered.
gunzip -c <trace> | <l1cache executable> -a <associativity> -s <cache size KB> -l <block size in bytes> -rp <replacement policy> Using - LRU, NRU, RRIP or RANDOM Ex: gunzip -c ./input/mcf.trace.gz | ./build/src/cache -t 32 -a 4 -l 64 -rp 0
Go to build and make cachetest. There are several options to run the tests.
./test/cachetest
Note
All commands are executed within Cache-Performance Simulation, the rest of the relative paths have already been considered.
./test/cachetest --gtest_filter=<test_name> ##### Google's gtest framework Ex: ./build/test/cachetest --gtest_filter=L1cache.hit_miss_srrip Ex: ./build/test/cachetest --gtest_filter=L1cache.hit_miss_lru Ex: ./build/test/cachetest --gtest_filter=L1cache.hit_miss_nru ###### Advanced Optimizations Ex: ./build/test/cachetest --gtest_filter=L2cache.l1_hit_l2_hit Ex: ./build/test/cachetest --gtest_filter=VCcache.l1_miss_vc_hit
./test/cachetest --gtest_filter=<regexp> ./test/cachetest --gtest_filter=VC*
./test/cachetest --gtest_filter=<test_name> --gtest_repeat=<n> Ex: ./test/cachetest --gtest_filter=L1cache.hit_miss_srrip --gtest_repeat=2
Each test is run with base seed, to replicate the result the same seed must be used ./test/cachetest --gtest_filter=<test_name> --gtest_random_seed=<test_seed> ./test/cachetest --gtest_filter=L1cache.hit_miss_srrip --gtest_random_seed=2126
To enable further debug on the test you need to enable debug_on variable, on your terminal run:
export TEST_DEBUG=1
To disable the extra logging, set the environment variable to zero.
| Back | FazBrowse Home | New Git URL |