instr_fetch is licensed under the GNU General Public License, version 2
instr_fetch is a Valgrind tool that that generates a trace of the instruction
lengths.
For realistic size simulations one would not want to generate a trace,
but it is
sufficient for a instruction cache simulator for a class. Storing the size of
the instructions for each basic block is relatively expensive. The traces grow
in size very rapidly, proportional to the size of the trace. With a processor
executing hundreds of millions of instructions per second traces can only
be for
a very short period of time.
Note that you need to use
the option --tool=inst_fetch
to run inst_fetch.