Setting a Barrier Breakpoint
Set a barrier breakpoint in the same way as a regular breakpoint: by either selecting the line in the Source pane and selecting Action Points > Set Barrier, or by right-clicking on the line and choosing Set Barrier from the context menu.
Once the barrier point is set, customize its properties by right-clicking on the barrier point in either the Source view or the Action Points tab, and choosing Properties to open the Modify Barrier Point dialog:
Figure 50, Modify Barrier Point Property dialog
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 do not continue.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 those waiting at an unsatisfied barrier, do not run. Only unheld threads run.
The When hit, stop option:
The When hit, Stop drop-down menu sets which other threads TotalView stops when execution reaches the barrier point, as follows:
Scope
Stopped Threads
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 option
The When Done, Stop drop-down menu defines what else it should stop, as follows:
Scope
Stopped Threads
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.