The easiest way to collect the data is to run the following command in the mttest directory:
% make hwcperf
The hwcperf target of the Makefile launches a collect command and records an experiment.
The experiment is named test.1.er by default and contains clock-profiling data and hardware counter profiling data for three counters: inst (instructions), cycles (cycles), and dcm (data-cache-misses).
If your system does not support a cycles counter or a dcm counter, the collect command will fail. In that case, edit the Makefile to move the # sign to the appropriate line to enable the HWC_OPT variable that specifies only those counters that are supported on your system. The experiment will not have the data from those counters that were omitted.