The code in this repo works to recreate a prefetcher described here: https://dl.acm.org/doi/abs/10.1145/3373376.3378498. Currently, the code can read in a trace file and create a dataflow graph (or the prefecth kernel) based on it, as described in section 4 of the paper.
main.c
reads in the trace file and creates the graph. The trace is saved in the structure specified in instruction.h
. The trace file and the cache miss profile
(generated by ChampSim tool) is provided to the program as inputs from command line. The main()
function will then first search the last occurence of an ip where
cache miss happened and record the previous instruction. And then, it builds up the graph.
In this file I defined the graph data structure used in the project with the help of boost/graph
library. The methods include basic graph operations as well as
a store-load-bypass function.
This program prints out a trace file.
The system must have boost/graph
library installed before use.
To run the program, use:
g++ -g -std=c++11 -o main main.cpp
./main -traces TRACE_FILE PROFILE_FILE