Setting a Barrier Breakpoint
You can set a barrier breakpoint by using the Action Point > Set Barrier command or from the Action Point > Properties Dialog Box. As an alternative, you can right-click on the line. From the displayed context menu, you can select the Set Barrier command.
Figure 102 – Action Point > Properties Dialog Box
You most often use barrier points to synchronize a set of threads. When a thread reaches a barrier, it stops, just as it does for a breakpoint. The difference is that TotalView prevents—that is, holds—each thread reaching the barrier from responding to resume commands (for example, step, next, or go) until all threads in the affected set arrive at the barrier. When all threads reach the barrier, TotalView considers the barrier to be satisfied and releases all of the threads being held there. They are just released; they are not continued. That is, they are left stopped at the barrier. If you continue the process, those threads also run.
If you stop a process and then continue it, the held threads, including the ones waiting at an unsatisfied barrier, do not run. Only unheld threads run.
The When Hit, Stop radio buttons indicate what other threads TotalView stops when execution reaches the breakpoint, as follows:
Scope
What TotalView does:
Group
Stops all threads in the current thread’s control group.
Process
Stops all threads in the current thread’s process.
Thread
Stops only this thread.
After all processes or threads reach the barrier, TotalView releases all held threads. Released means that these threads and processes can now run.
The When Done, Stop radio buttons tell TotalView what else it should stop, as follows:
Scope
What TotalView does:
Group
Stops all threads in the current thread’s control group.
Process
Stops all threads in the current thread’s process.
Thread
Stops only this thread.
CLI: dbarrier -stop_when_done