30.01.2013 Views

TotalView Users Guide - CI Wiki

TotalView Users Guide - CI Wiki

TotalView Users Guide - CI Wiki

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Manipulating Processes and Threads<br />

You can hold or release a thread, process, or group of processes in one of<br />

the following ways:<br />

� You can hold a group of processes using the Group > Hold command.<br />

� You can release a group of processes using the Group > Release command.<br />

� You can toggle the hold/release state of a process by selecting and clearing<br />

the Process > Hold command.<br />

� You can toggle the hold/release state of a thread by selecting and clearing<br />

the Thread > Hold command.<br />

CLI: dhold and dunhold<br />

Setting the focus changes the scope.<br />

If a process or a thread is running when you use a hold or release command,<br />

<strong>TotalView</strong> stops the process or thread, and then holds it.<strong>TotalView</strong><br />

lets you hold and release processes independently from threads.<br />

The Process pulldown menu contains a Hold Threads and a Release Threads<br />

command. Although they appear to do the same thing, they are used in<br />

slightly different ways. When you use the Hold Threads commands on a<br />

multi-threaded process, you place a hold on all threads. This is seldom<br />

what you want as you really do want something to run. After selecting this<br />

command, go to the thread that you want to run and then clear the Thread<br />

> Hold command so that <strong>TotalView</strong> lets it run. This may appear awkward,<br />

but it is actually an easy way to select one or two threads when your program<br />

has a lot of threads. You can verify that you’re doing the right thing by<br />

looking at the thread’s status in the Root Window.<br />

CLI: dhold –thread<br />

dhold –process<br />

dunhold –thread<br />

The following set of drawings presents examples of using hold commands:<br />

Held/Release State What Can Be Run Using Process > Go<br />

This figure shows a process with three threads. Before you do<br />

anything, all threads in the process can be run.<br />

Select the Process > Hold toggle. The blue indicates that you<br />

held the process. (Or, at least its in blue if you are viewing<br />

this online.)<br />

Nothing runs when you select Process > Go.<br />

232 Chapter 12: Debugging Programs

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

Saved successfully!

Ooh no, something went wrong!