All source code of "Loop2Recursion: Compiler-Assisted Wear Leveling for Non-Volatile Memory", including the Loop2Recursion LLVM Pass, the Intel Pin-based profiling tools, as well as data preprocessing scripts.
- Unix-like system with the
/tmpdirectory - At least 8 GB of RAM
- clang+llvm-13.0.1
- pypy, with the following extensions:
- intervaltree
- more-itertools
- numpy
- Jupyter Notebook, with a Python 3 kernel and the following extensions:
- matplotlib
- ipympl
- numpy
- pandas
- pylatex
- scipy
- Download Intel Pin, extract, and move the extracted directory (e.g.
pin-3.11-97998-g7ecce2dac-gcc-linux) containing thepinexecutable to EXPERIMENT_ROOT. - Edit
parameters.sh, and change the value ofPIN_ROOT. Edit the values of other variables as required. - Run
build_loop2recursion.sh - Run
build_libuwlalloc.sh - Run
build_pin_tools.sh
bash compile_baseline.shbash extract_loop_information.shbash selective_loop2recursion.sh
for recursion_depth_limit in 8 16 32 64 128 256
do
bash run_unoptimized_loop2recursion.sh -t "unoptimized_loop2recursion-recursion_depth_limit-${recursion_depth_limit}" -p "-recursion-depth-limit ${recursion_depth_limit}"
donefor recursion_depth_limit in 8 16 32 64 128 256
do
bash run_optimized_loop2recursion.sh -t "new_loop2recursion-recursion_depth_limit-${recursion_depth_limit}" -p "-recursion-depth-limit ${recursion_depth_limit}"
donefor loop_iterations in 8 16 32 64 128 256
do
bash run_optimized_loop2recursion.sh -t "new_loop2recursion-loop_iterations-${loop_iterations}" -p "-loop-iterations ${loop_iterations}"
doneThis process takes a long time (around a day).
bash profile.sh -t baseline
bash profile.sh -t selective_loop2recursion
bash profile.sh -t unoptimized_loop2recursion
bash profile.sh -t new_loop2recursion
for recursion_depth_limit in 8 16 32 64 128 256
do
bash profile.sh -t "unoptimized_loop2recursion-recursion_depth_limit-${recursion_depth_limit}"
done
for recursion_depth_limit in 8 16 32 64 128 256
do
bash profile.sh -t "new_loop2recursion-recursion_depth_limit-${recursion_depth_limit}"
done
for loop_iterations in 8 16 32 64
do
bash profile.sh -t "new_loop2recursion-loop_iterations-${loop_iterations}"
donebash profile_extras.sh -t unoptimized_loop2recursion
bash profile_extras.sh -t new_loop2recursionbash profile_uwlalloc.shRun the following Jupyter Notebooks:
average_maximum_stack_usages_and_average_writes_on_hottest_stack_address_under_different_recursion_depth_limits_and_loop_iterations.ipynbbaseline_loop2recursion_new_loop2recursion.ipynbbaseline_uwlalloc_recursion_depth_limit.ipynbexperiment_data_visualization.ipynbloop_iterations_list.ipynbrecursion_depth_limit.ipynbcache_analysis.ipynbwrites_on_stack_addresses_for_benchmark_dijkstra_on_cache_less_architecture.ipynbwrites_on_stack_addresses_on_cache_enabled_architecture.ipynb