Intel® Advisor User Guide

ID 766448
Date 12/16/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

advisor-annotate.h and libittnotify.dll

NOTE:

This topic is provided for reference, but it should not be needed. If you read this because you believe you need it to understand a problem, please provide feedback (see the release notes for support information).

Code using advisor-annotate.h should work when running your application regardless of whether or not you are running your application under Visual Studio using Intel® Advisor on Windows* OS. However, should you run into problems, this topic provides a few implementation details that might be helpful to understand issues.

Each compilation unit that includes advisor-annotate.h, and that has one or more annotations in it, will have a global inline routine named __AnnotateRoutine. This routine is called from the various locations where you have used the ANNOTATE* macros, and will be used to invoke one or more routines in libittnotify.dll (on Windows OS) or libittnotify.so (on Linux* OS).

__AnnotateRoutine is an inline function that will have only one copy per executable in your program. So, if you are only working on modeling semantic behavior in a single Dynamic Link Library (DLL), you will only have one copy of it in that one library. If you have multiple executables where you have annotations, there will be a single copy of __AnnotateRoutine for each executable.

When the ANNOTATE macros are used, the first one executed in a given executable attempts to load libittnotify.dll from the current path.

Once the library is loaded, calls from the annotations will go to the __itt_model* routines in the library. If an expected routine is not found, the code asserts.

The following figure shows what happens when you have a main executable and a DLL that both have annotations:

Finally, the annotation routines -__itt_model* in the .dll - by themselves are only markers for a tool that interprets the calls. Unless the program is run under the tool, these routines will not do anything. The intent is that the application will run normally when it is not run under the tool.

See Also