dfocus
Changes the current (Process/Thread P/T) set
Format
Changes the target of future CLI commands to this P/T set or returns the value of the current P/T set
dfocus [ p/t-set ]
Executes a command in this P/T set
dfocus p/t-set command
Arguments
p/t-set
A set of processes and threads to be the target of subsequent CLI commands.
command
A CLI command that operates on its own local focus. This argument may be a single command or a list.
Description
The dfocus command changes the set of processes, threads, and groups upon which a command acts. This command can change the focus for all commands that follow, or just the command that immediately follows.
If a command argument is provided, the focus is set temporarily, command is executed in the new focus, and then the focus is restored to its old value.
For example, to continue the TotalView group containing the focus process, you could type:
dfocus g dgo
To stop process 3 and display backtraces for each of its threads, type:
dfocus p3 { dhalt ; dwhere }
Summary
• If ptset is provided but not command: The default focus for subsequent commands is changed to ptset.
• If neither command nor ptset are provided: The current default focus is returned as a string value.
• If no argument is provided: dfocus returns the focus as a string value.
• If any argument is provided: dfocus returns the result of the command.
For more information on command output, enter "help output".
For more information on P/T sets, see Chapter 21, “Group, Process and Thread Control” of the TotalView for HPC User Guide.
Command alias
Alias | Definition | Description |
f | dfocus | Changes the object upon which a command acts |
Examples
dfocus g dgo
Continues the TotalView group that contains the focus process.
dfocus p3 {dhalt; dwhere}
Stops process 3 and displays backtraces for each of its threads.
dfocus 2.3
Sets the focus to thread 3 of process 2, where 2 and 3 are TotalView process and thread identifier values. The focus becomes d2.3.
dfocus 3.2
dfocus .5
Sets and then resets command focus. A focus command that includes a dot and omits the process value uses the current process. Thus, this sequence of commands changes the focus to process 3, thread 5 (d3.5).
dfocus g dstep
Steps the current group. Although the thread of interest (TOI) is determined by the current focus, this command acts on the entire group that contains that thread.
dfocus {p2 p3} {dwhere ; dgo}
Performs a backtrace on all threads in processes 2 and 3, and then tells these processes to execute.
f 2.3 {f p w; f t s; g}
Executes a backtrace (
dwhere) on all the threads in process 2, steps thread 3 in process 2 (without running any other threads in the process), and continues the process.
dfocus p1
Changes the current focus to include just those threads currently in process 1. The width is set to process. The CLI sets the prompt to p1.<.
dfocus a
Changes the current set to include all threads in all processes. After you execute this command, your prompt changes to a1.<. This command alters CLI behavior so that actions that previously operated on a thread now apply to all threads in all processes.
dfocus gW dstatus
Displays the status of all worker threads in the control group. The width is group level and the target is the workers group.
dfocus pW dstatus
Displays the status of all worker threads in the current focus process. The width is process level and the target is the workers group.
f {breakpoint(a) | watchpoint(a)} st
Shows all threads that are stopped at breakpoints or watchpoints.
f {stopped(a) - breakpoint(a)} st
Shows all stopped threads that are not stopped at breakpoints.
Chapter 21 of the TotalView for HPC User Guide contains additional dfocus examples.
Related Topics
Using Groups, Processes, and Threads in the TotalView for HPC User Guide