Setting Focus in the CLI
In the GUI, you set the focus (or scope) of a command such as Step by selecting an entry in the pull down list on the left side of the toolbar. In the CLI, you set this by using the dfocus command. For example, here is the command that changes the focus to group 2:
dfocus g2
The letter "g" tells the CLI which processes and threads it will control. Here's the complete list of letters:
t
Thread
A command's target is the indicated thread.
p
Process
A command's target is the process that contains the TOI (Thread of Interest).
g
Group
A command's target is the group that contains the POI (Process of Interest). This indicates control and share groups.
a
All processes
A command's target is all threads in the GOI (Group of interest) that are in the POI.
You can also combine the width with another letter that indicates the kind of
group. Here are the letters you can use:
C
Control group
All processes in the control group.
S
Share group
The set of processes in the control group that have the same executable as the arena's TOI.
W
Workers group
The set of all worker threads in the control group.
L
Lockstep group
A set that contains all threads in the share group that have the same PC as the arena's TOI. If you step these threads as a group, they proceed in lockstep.
You can combine these letters to further limit which threads the CLI will control. For example, "pS" tells the CLI that it should focus on all threads in the process that participate in the same share group as the TOI.
You can, of course, add a process number to what you type: Here's an example of adding a process number:
gW3
This tells the CLI that it will focus on all worker threads in the control group that contains process 3. The difference between this and pW3 is that pW3 restricts the focus to one of the processes in the control group.
This tip barely scratches the surface of how you specify command focus in the CLI. You will find complete information in Chapter 12 of the TotalView Users Guide.
This tip concludes this multipart look at the way you can specify which threads TotalView will manipulate. Please send email to documentation@totalviewtech.com if you want anything in this series needs to be clarified or if you want information that hasn't been provided. If we use the information you send, we'll send you a TotalView Technologies memory stick.
You can find tips that we've already sent out in our Tip Archive
Help us improve these tips!