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. (Right-clicking on the line also allows you to set a barrier.)
Action Point > Properties Dialog Box 
|
Barrier breakpoints are most often used 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 them. They are just released; they are not continued. That is, they are left stopped at the barrier. If you now continue the process, those threads stopped at the barrier also run. This is in addition to any other threads that were not affected with the barrier.
If a process is stopped and then continued, 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 should stop when execution reaches the breakpoint, as follows:
Scope |
TotalView will: |
Group |
Stop all threads in the current thread's control group. |
Process |
Stop all threads in the current thread's process. |
Thread |
Only stop 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 |
TotalView will: |
Group |
Stop all threads in the current thread's control group. |
Process |
Stop all threads in the current thread's process. |
Thread |
Only stop this thread. |
For even more control over what TotalView will stop, you can indicate a satisfaction set. This set indicates which threads must be held before TotalView will release the group of threads. That is, the barrier is satisfied when TotalView has held all of the indicated threads. Use the Satisfaction group items to tell TotalView that the satisfaction set consists of all threads in the current thread's Share, Workers, or Lockstep group.
When you set a barrier point, TotalView places it in every process within the share group.
If you run one of the processes or threads in a group and it hits a barrier point, you will see an H next to the process or thread name in the Root Window and the word [Held] in the title bar in the main Process Window. Barrier points are always shared.
If you create a barrier and all the processes threads are already at that location, TotalView does not hold any of them. However, if you create a barrier and all of the processes and threads are not at that location, TotalView holds the ones that already there, and does not hold the ones that are not there yet.