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.

Setting Process and Thread Focus<br />

A P/T set is a list that contains one or more P/T identifiers. (The next section,<br />

“Specifying Arenas” on page 259, explains what a P/T identifier is.) Tcl<br />

lets you create lists in the following ways:<br />

� You can enter these identifiers within braces ({}).<br />

� You can use Tcl commands that create and manipulate lists.<br />

These lists are then used as arguments to a command. If you’re entering<br />

one element, you usually do not have to use the Tcl list syntax.<br />

For example, the following list contains specifiers for process 2, thread 1,<br />

and process 3, thread 2:<br />

{p2.1 p3.2}<br />

If you do not explicitly specify a P/T set in the CLI, <strong>TotalView</strong> defines a target<br />

set for you. (In the GUI, the default set is determined by the current<br />

Process Window.) This set is displayed as the default CLI prompt. (For information<br />

on this prompt, see “About the CLI Prompt” on page 207.)<br />

You can change the focus on which a command acts by using the dfocus<br />

command. If the CLI executes the dfocus command as a unique command,<br />

it changes the default P/T set. For example, if the default focus is process 1,<br />

the following command changes the default focus to process 2:<br />

dfocus p2<br />

After <strong>TotalView</strong> executes this command, all commands that follow focus on<br />

process 2.<br />

In the GUI, you set the focus by displaying a Process Window that contains this process.<br />

Do this by using the P+ and P– buttons in the tab bar at the bottom, by making a selection<br />

in the Processes/Ranks Tab, or by clicking on a process in the Root Window.<br />

If you begin a command with dfocus, <strong>TotalView</strong> changes the target only for<br />

the command that follows. After the command executes, <strong>TotalView</strong><br />

restores the former default. The following example shows both of these<br />

ways to use the dfocus command. Assume that the current focus is process<br />

1, thread 1. The following commands change the default focus to group 2<br />

and then step the threads in this group twice:<br />

dfocus g2<br />

dstep<br />

dstep<br />

In contrast, if the current focus is process 1, thread 1, the following commands<br />

step group 2 and then step process 1, thread 1:<br />

dfocus g2 dstep<br />

dstep<br />

Some commands only operate at the process level; that is, you cannot<br />

apply them to a single thread (or group of threads) in the process, but must<br />

apply them to all or to none.<br />

258 Chapter 13: Using Groups, Processes, and Threads

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

Saved successfully!

Ooh no, something went wrong!