Symbol Resolution for Function Tasks

When tracing tasks in your code, you can capture two different kinds of tasks:

  • named tasks – to trace a portion of code within a function
  • function tasks – to trace a complete function call as a task; this is especially useful if you are calling the function indirectly and do not know its name

For more information regarding named tasks and function tasks, please refer to the Intel® GPA SDK Reference.

The Intel® GPA Platform Analyzer displays a textual label for each task:

  • For a named task, the label contains the string that you supplied to the __itt_task_begin call in your instrumented code.
  • For a function task, the label contains either a relative pointer value of the form “<module>+<offset>”, or a fully-qualified function signature of the form “void foo(int arg)”.

Which format appears depends on whether the Intel GPA Platform Analyzer is able to resolve the function’s pointer value to an entry in the symbol table within the module containing the function. During trace collection, the filename for each module within the instrumented process is written into the captured trace file. When you open a trace file, the Intel GPA Platform Analyzer will attempt to read the symbol table in the binary file, within the local file system, for each module in the trace.
If you develop code on one machine and test it on another, it is a good practice to map a network drive from the target machine back to the development machine so that you can run your code directly from the mapped drive and thus avoid having to copy files every time you make changes to your code and rebuild your application. If you run the Intel GPA Platform Analyzer on the development machine, a good strategy is to use the Windows subst command to add the captured module paths into the development machine’s file system. For example, suppose that you have mapped a network drive T: from your target machine back to C:srcroot on your development machine, and that you have captured a trace by running an application from drive T: on the target machine. When the Intel GPA Platform Analyzer tries to find modules to resolve symbols in the trace, it will search for modules on drive T:. Since drive T: does not exist on your development machine, you can create a virtual drive T: using the subst command: in this case, subst T: C:srcroot. This will ensure that Platform Analyzer file operations on drive T: get automatically routed to C:srcroot.

Symbol Resolution for Function Tasks