Holding and Releasing Processes and Threads
As an alternative to synchronizing execution automatically by setting a barrier point, you can synchronize execution manually by using a hold command.
When a process or a thread is held, it ignores any command to resume executing. For example, if you placed a hold on a single process in a control group that contained three processes, selecting Group > Go resumes executing only the two unheld processes in the group. The held process ignores the Go command.
Manually holding and releasing processes and threads is useful in the following situations:
When you need to run only a subset of the processes and threads, you can manually hold all others and allow to run only the ones you want.
When a process or thread is held at a barrier point, and you want to run it without first running all the other processes or threads in the group to that barrier, you can manually release the specific process or thread and then run it.
See Barrier Points for more information on holding and releasing barrier breakpoints.
On this page:
Holding a Process
To place or release a hold on a process, double-click the process in the Processes & Threads view to select it, and then toggle the menu item Process > Hold.
Alternatively, to place or release a hold on the group of processes to which the selected process belongs, select Group > Hold or Group > Release, respectively.
Group > Hold holds all processes that are part of the same control group associated with the current thread in focus. And Group > Release releases all processes that were held in the control group.
If you hold a process and then select Process > Go, a warning alerts you that you first need to remove the hold on the process before running it.
Viewing the Hold Status
You can observe the hold status of a process in TotalView's Processes & Threads view in both the tree view (
) and the tabular view (
), as shown in Figure 117 and Figure 118, respectively.
Figure 117. Process status in the Processes & Threads view, Tree view
Figure 118. Process status in the Processes & Threads view, Tabular view
You can also observe the hold status for a selected process in TotalView's title and status bar.
Placing and Releasing Holds Using CLI Commands
You can use the following CLI commands to hold and release a process.
Holding a Thread
To place or release a hold on a thread, double-click the thread in the Processes & Threads view to select it, and then toggle the menu item Thread > Hold.
Alternatively, to place or release a hold on all threads in the process to which the selected thread belongs, select Process > Hold Threads or Process > Release Threads, respectively. Process > Hold Threads holds all threads that are part of the same process associated with the current thread in focus. And Process > Release Threads releases all threads that were held in the process.
If you hold a thread and then select Thread > Go, a warning alerts you that you first need to remove the hold on the thread before running it.
Viewing the Hold Status
You can observe the hold status of a thread in TotalView's Processes & Threads view in both the tree view (
) and the tabular view (
), as shown in Figure 119 and Figure 120, respectively.
Figure 119. Thread status in the Processes & Threads view, Tree view
Figure 120. Thread status in the Processes & Threads view, Tabular view
You can also observe the hold status for a selected thread in TotalView's title and status bar.
Placing and Releasing Holds Using CLI Commands
You can use the following CLI commands to hold and release a thread.