Adding Annotations into Your Source Code

When using a Windows* OS system with Visual Studio* installed, youYou can add Intel Advisor annotations in your source code by using one of the following:

  • Copying annotations with the annotation assistant in the Survey Report window, Survey Source window, or the No Data message. Use the annotation assistant to copy the main annotations for parallel sites, tasks, and locks. For example, the annotation assistant appears in the lower part of the Survey Report window:

    Survey Report showing annotation assistant pane

    Survey Report window showing annotation assistant pane

  • When using the Visual Studio* code editor, you can use the Annotation Wizard to select an annotation type and add the annotations and their arguments into your code. You can use the Annotation Wizard to add parallel site, task, lock, pause/resume data collection, and special-purpose annotations. For example, the first of several dialog boxes for the Annotation Wizard provides a drop-down list that lets you choose the type of annotations and an explanation of the selected item at the bottom:

    Annotation Wizard first dialog box


If your sources include huge source files that contain annotations, be aware that only the first 8 MB of each file will be parsed for annotations. If not all of your annotations are being parsed in such huge source files, consider breaking each huge source file into several source files.

For more complete information about compiler optimizations, see our Optimization Notice.