Setting Group Focus
When you start a multiprocess program, the CLI adds each process to a control group as the process starts. TotalView decides which group it should place the process based on the system call--fork() or execve()--that created or changed the processes.
TotalView has two kinds of groups: process groups and thread groups. Process groups only contain processes. Thread groups only contain threads, but threads in a thread group can come from any process.
There are two different types of process groups:
- Control Group
Contains the parent process and all related processes. A control group includes children that were forked (processes that share the same source code as the parent) and children that were forked but which subsequently called execve().
Assigning a new value to the CGROUP(dpid) variable for a process changes that processes control group. In addition, the dgroups -add command lets you add members to a group.
- Share Group
Contains all members of a control group that share the same executable image. (Note, however, that dynamically loaded libraries may vary between share group members.)
TotalView automatically places processes in share groups based on their control group and their executable image.
Note: You cannot change a share group's members.
In addition, there are also two types of thread groups:
- Workers Group
Contains all worker threads from all processes in the control group. By default, it contains all threads except the kernel-level manager threads that can be identified. TotalView does not let you delete a workers group.
- Lockstep Group
Contains every stopped thread in a share group that has the same PC. There is one lockstep group for every thread. For example, suppose two threads are stopped at the same PC. TotalView will create two lockstep groups. While each lockstep group has the same two members, they differ in that each has a different thread of interest.
The group ID's value for a lockstep group differs from the ID of other groups. Rather than an automatically allocated integer ID, the lockstep group ID has the form pid.tid, where pid.tid identifies the thread with which it is associated. For example, the lockstep group for thread 2 in process 1 is 1.2.
In general, if you are debugging a multiprocess program, the control group and share group differ only when the program has children that are forked with a call to execve().