The Call Stack
When stack filtering is turned on (see Enabling Stack Filtering), the Call Stack displays a transformed version of the stack, which includes filtering out, inserting, and annotating stack frames.
How OpenMP Stack Transformations Work in TotalView
When stack filtering is enabled for an OpenMP program that has OMPD support enabled, TotalView:
*Filters out OMP runtime frames.
*Annotates parallel and task region function names with #pragma omp parallel or #pragma omp task for C/C++ programs and !$omp parallel or !$omp task for Fortran programs.
*Inserts "parent thread link" frames, so that clicking on the frame focuses on the encountering thread's generating task frame. Parent thread link frames are inserted only if the parent thread is different than the current thread. If the generating task frame no longer exists in the parent frame, then the debugger focuses on frame 0.
For example, consider an OpenMP program with a single parallel region and multiple threads. When a breakpoint is hit and you focus on a thread in the Processes & Threads view, that thread’s backtrace displays in the Call Stack, as usual:
Observe the following:
*The Call Stack is filtered, identified by the orange filter icon (). Selecting the icon toggles the state of stack filtering.
*The OpenMP runtime frames have been removed from the display.
*Selecting the #pragma omp task frame in the Call Stack automatically navigates to the location in the source code containing the #pragma omp directive. Selecting the frame will focus on a source line within the parallel or task region, although the exact location depends on the compiler:
*The stack backlink to the parent thread is identified by a link icon (). In this example, the thread that has focus, or 1.4, was invoked by a parallel region in parent thread 1.1 in function main, identified by the popup tip when you hover a cursor over its entry in the Call Stack:
Clicking this link focuses the source pane on its parent thread’s stack frame for function main, which in turn updates the Call Stack for the backtrace for thread 1.1:
This parent/child stack linking continues through the backtrace until the initial thread 1.1, is reached.