10.2 Adding Streamline Annotate to your code

Streamline provides a set of macros that enable you to send customized output to your generated Analysis Reports. This feature, called Annotate, is much more versatile than printf statements, and you can use them add overlays or automatic bookmarks to the Timeline view.

To start using the Annotate feature, follow these steps:


  1. Ensure gatord is running. gatord creates the /dev/gator/annotate file.
  2. Include the streamline_annotate.h header file by adding the following include statement to your code: #include "streamline_annotate.h"
  3. Add the ANNOTATE_SETUP macro to your code. It must be called before any other annotate macros are called.
  4. Add one ANNOTATE_DEFINE macro to your code.
  5. Write null-terminated strings to the file from any thread using the ANNOTATE macro: ANNOTATE(string)
  6. Optionally set the color of the annotation using the ANNOTATE_COLOR macro and by either choosing a color constant from those defined in streamline_annotate.h or by sending the ASCII escape code followed by a 3-byte RGB value: ANNOTATE_COLOR(color, string)
  7. Optional: Write an empty string to clear the annotation message for the thread.
Related concepts
Annotate overview
Related tasks
Importing the Streamline_annotate example
Related reference
Annotate macros
Non-ConfidentialPDF file icon PDF versionARM DUI0482M
Copyright © 2010-2013 ARM. All rights reserved.