30.01.2013 Views

TotalView Users Guide - CI Wiki

TotalView Users Guide - CI Wiki

TotalView Users Guide - CI Wiki

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Setting Breakpoints and Barriers<br />

About Barrier Breakpoint States<br />

Processes and threads at a barrier point are held or stopped, as follows:<br />

Held A held process or thread cannot execute until all the<br />

processes or threads in its group are at the barrier, or<br />

until you manually release it. The various go and step<br />

commands from the Group, Process, and Thread menus<br />

cannot start held processes.<br />

Stopped When all processes in the group reach a barrier point,<br />

<strong>TotalView</strong> automatically releases them. They remain<br />

stopped at the barrier point until you tell them to resume<br />

executing.<br />

You can manually release held processes and threads with the Hold and<br />

Release commands found in the Group, Process, and Thread menus. When<br />

you manually release a process, the go and step commands become available<br />

again.<br />

CLI: dfocus ... dhold<br />

dfocus ... dunhold<br />

You can reuse the Hold command to again toggle the hold state of the process<br />

or thread. See “Holding and Releasing Processes and Threads” on page 231<br />

for more information.<br />

When a process or a thread is held, <strong>TotalView</strong> displays an H (for a held process)<br />

or an h (for a held thread) in the process’s or thread’s entry in the Root<br />

Window.<br />

Setting a Barrier Breakpoint<br />

You can set a barrier breakpoint by using the Action Point > Set Barrier<br />

command or from the Action Point > Properties Dialog Box. As an alternative,<br />

you can right-click on the line. From the displayed context menu, you<br />

can select the Set Barrier command. (See Figure 235 on page 364.)<br />

You most often use barrier points to synchronize a set of threads. When a<br />

thread reaches a barrier, it stops, just as it does for a breakpoint. The difference<br />

is that <strong>TotalView</strong> prevents—that is, holds—each thread reaching the<br />

barrier from responding to resume commands (for example, step, next, or go)<br />

until all threads in the affected set arrive at the barrier. When all threads<br />

reach the barrier, <strong>TotalView</strong> considers the barrier to be satisfied and releases<br />

all of the threads being held there. They are just released; they are not continued.<br />

That is, they are left stopped at the barrier. If you continue the process,<br />

those threads also run.<br />

If you stop a process and then continue it, the held threads, including the<br />

ones waiting at an unsatisfied barrier, do not run. Only unheld threads run.<br />

<strong>TotalView</strong> <strong>Users</strong> <strong>Guide</strong>: version 8.7 363

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!