Inserting markers
You can insert markers into the source code of any application, to make it easier to track progress on the Streamline timeline. You can find everything that you need in the annotate/
directory of the gator software.
To insert a marker, follow these steps:
- Include the following header file at the top of the source file, to add a marker to the LMbench source file
bw_mem.c
:#include "streamline_annotate.h"
- Add
ANNOTATE_SETUP;
during the setup, somewhere in themain()
function before the test is run. - Put the markers where they are needed, to track the test on the Streamline timeline, as seen in the following code:
void rd(iter_t iterations, void *cookie) { state_t *state = (state_t *) cookie; register TYPE *lastone = state->lastone; register int sum = 0; ANNOTATE_MARKER_STR("start of rd"); while (iterations-- > 0) { register TYPE *p = state->buf; while (p <= lastone) { sum += #define DOIT(i) p[i]+ DOIT(0) DOIT(4) DOIT(8) DOIT(12) DOIT(16) DOIT(20) DOIT(24) DOIT(28) DOIT(32) DOIT(36) DOIT(40) DOIT(44) DOIT(48) DOIT(52) DOIT(56) DOIT(60) DOIT(64) DOIT(68) DOIT(72) DOIT(76) DOIT(80) DOIT(84) DOIT(88) DOIT(92) DOIT(96) DOIT(100) DOIT(104) DOIT(108) DOIT(112) DOIT(116) DOIT(120) p[124]; p += 128; }
- Edit the
Makefile
to: - Add the directory containing
streamline_annotate.h
to the compiler include path. - Add
streamline_annotate.c
to the list of source files to compile.