Stepping
The action that the CLI will perform when stepping assembler instructions or source statements depends on whether you have specified thread, process, or group width.
Note: If you do not explicitly name a group, the CLI steps the control group.
The following sections describe what happens at each width. In all cases, if a thread hits an action point other than the goal breakpoint during a stepping operation, the operation ends.
Thread
TotalView steps the thread of interest (TOI). Stepping a thread is not the same as stepping a thread's process because a process can have more than one thread.
Note: Thread stepping is not implemented on Sun platforms. On SGI platforms, thread stepping is not available with pthread programs. If, however, your program's parallelism is based on SGI's sprocs, thread stepping is available.
Stepping at thread width (t) tells the CLI that it should just run that thread. In contrast, process width (p) tells the CLI that it should run all threads in the process that are allowed to run while the thread of interest is stepped.
TotalView also allows all manager threads to run freely while the stepping action is occurring.
Process
The behavior (which is the default) depends on whether the group of interest (GOI) is set to a process group or a thread group. If the GOI is a:
- Process group, TotalView runs all threads in the process, and execution continues until the thread of interest arrives at its goal location, which can be the next statement, the next instruction, and so on. Only when the TOI reaches the goal are the other threads in the process stopped.
- Thread group, the behavior differs. All threads in the GOI, and all manager threads are allowed to run. As each member of the GOI arrives at the goal, it is stopped; the rest of the threads are allowed to continue. The command finishes when all members of the GOI arrive at the goal. At that point, TotalView stops the whole process.
Group
The behavior again depends on whether the GOI is a process group or a thread group. If the GOI is a:
- Process group, TotalView examines that group and identifies each process in it which has a thread stopped at the same location as the thread of interest (a matching process). TotalView runs all processes in the control group associated with the process of interest. Each time a thread arrives at the goal, the process containing that thread is stopped. The command finishes after TotalView stops all "matching" processes. At that time, all members of the control group will also be stopped.
- Thread group, TotalView again runs all processes in the control group. However, as each thread arrives at the goal, TotalView just stops that thread; the rest of the threads in the process containing it are allowed to continue. The command finishes when all threads in the group of interest have arrived at the goal. (TotalView does not wait for threads that are not in the same share group as the thread of interest since they are executing different code and can never arrive at the goal.) When the command finishes, TotalView again stops all process in the control group.