TotalView Online Help : Process Window : Action Point Menu : Action Point > Properties

Action Point > Properties
Use this dialog box to modify the properties of an existing action point. This dialog box lets you control attributes of your action point as well as change it from one kind of action point into another. If you are creating an evaluation point, you will use this window to enter your C, Fortran, or Assembler code.
*
The only kind of action point not controlled by this dialog box is the watchpoint. Use the Tools > Create Watchpoint command within a Variable Window when you want to set or alter a watchpoint.
The following three controls let you set or change what will happen when a program encounters an action point:
Breakpoint
When an executing thread encounters a breakpoint, it stops at the breakpoint. Other controls let you indicate if the thread’s process or control group will also stop.
Barrier
Process barrier breakpoints are similar to simple breakpoints, differing in that they let you synchronize a group of processes in a multiprocess program. Other controls let you indicate if the thread’s process or control group will also stop and what condition must be satisfied for TotalView to release threads held at the barrier.
Evaluate
An evaluation point is a breakpoint that has code associated with it. When a thread or process encounters an evaluation point, it executes this code. You can use evaluation points in several different ways, including as conditional breakpoints, thread-specific breakpoints, countdown breakpoints, and for patching code fragments into and out of your program.
General Controls
The following four controls are used by all three kinds of action points.
Addresses
If the selected line could be mapped to more than one place—for example, you selected a line in a template or an inline function—selecting this button tells TotalView to display a dialog box that lets you refine where TotalView places breakpoints. Do this by individually selecting or clearing the locations at which TotalView will set the breakpoint.
 
Process
Lets you indicate which process in a multi-process program will have enabled breakpoints. After selecting this button, TotalView displays a dialog box similar to the one it displays when you select the Addresses button. Note that if Plant in share group is selected, this button is not enabled because you’ve told TotalView to set the breakpoint in all processes.
Enable action point
When set, TotalView activates this action point. If this control is not selected, TotalView ignores the action point.
Plant in share group
When set, the action point is shared among all of the threads in the thread’s share group. In all cases, TotalView places an action point in each member of the share group.
If you select this option, TotalView enables (makes active) all of these points.
If you do not select this option, TotalView only enables this action point; all others are disabled.
Breakpoint
Setting a breakpoint tells TotalView that when execution reaches this line, it should not allow execution to continue.
 
The When Hit, Stop radio buttons indicate which other threads TotalView should stop when execution reaches the breakpoint, as follows:
You need to be careful when setting this attribute. For example, if you tell TotalView that it should stop the thread when this breakpoint is hit and you also tell it that the satisfaction set is, for example, the workers group, your thread will stop but the remainder of the workers group will continue executing. In most cases, this is not what you would want as most of the time you will be stopping an individual thread to examine all of the program’s state at that time and TotalView cannot give you the entire state unless the other threads are also stopped.
Barrier
Select this radio button to set a process barrier breakpoint. Process barrier breakpoints are triggered when execution arrives at a line or instruction.
 
Barrier breakpoints are most often used to synchronize a set of processes and threads. When a thread reaches a barrier, it stops, just as it does for a breakpoint. The difference is that TotalView prevents—that is, holds—each thread reaching the barrier from responding to resume commands (for example, step, next, or go) until all threads in the affected set arrive at the barrier. When all threads reach the barrier, TotalView considers the barrier to be satisfied and releases these threads. They are just released; they are not continued. That is, they are left stopped at the barrier. If you now continue the process, those threads stopped at the barrier also run. This is in addition to any other threads that were not participating with the barrier.
If a process is stopped and then continued, the held threads, including the ones waiting on an unsatisfied barrier, do not run. Only the unheld threads run.
When Hit, Stop
Indicate which other threads TotalView should stop when execution reaches the breakpoint, as follows:
Group: Stop all threads in the current thread’s control group.
Process: Stop all threads in the current thread’s process.
Thread: Only stop this thread.
After all processes or threads reach the barrier, TotalView releases all held threads. (Released means that these threads and processes can now run.)
When Done, Stop
Tells TotalView what else it should stop. The meaning of these buttons is the same as the buttons in the When Hit, Stop area.
Satisfaction group
For even more control over what is stopped, you can indicate a satisfaction set. This set indicates which threads must be held before any of these held threads can be released. That is, the barrier is satisfied when all of the indicated threads are held. Your selection here tells TotalView that the satisfaction set consists of all threads in the current thread’s Share, Workers, or Lockstep group.
Evaluate
When your program encounters an evaluation point, the code you enter is executed. TotalView can either compile or interpret the code you enter here. On some machines, it can only interpret your code. If TotalView can compile your code, it patches the compiled code into your process. If TotalView must interpret your code, TotalView executes this information after your program reaches the evaluation point. In either case, the code executes before the code within the source line executes.
When entering code, indicate which programming language you are using. You can specify C++, C, Fortran, or Assembler.
Chapter 16 of the TotalView Users Guide contains an extensive evaluation points discussion.
Here are some examples of ways to use evaluation points:
Countdown Breakpoints
The following is an example of a C language countdown breakpoint:
static int count = 100;
if (count-- == 0) {
$stop;
count = 100;
}
Conditional Breakpoints
The following is an example of a C language conditional breakpoint:
if (index < 0 || ptr == 0)
$stopall;
Conditional Barriers
The following is an example of a C language conditional barrier point:
if (index < 0 || ptr == 0)
$holdstopall;
In these examples, the $stop, $stopall, and $holdstopall special directives stop a process when a condition is true. For more information, see “Built-In Statements” in the TotalView Users Guide.

Rogue Wave Software, Inc.
Voice: (303) 473-9118
rwonlinedocs@roguewave.com