Built-In Statements

TotalView provides a set of built-in statements that you can use when writing code fragments. The statements are available in all languages, and are shown in the following table.

Statement
Use
$count expression
$countprocess expression
Sets a process-level countdown breakpoint. When any thread in a process executes this statement for the number of times specified by expression, the process stops. The other processes in the control group continue to execute.
$countall expression
Sets a program-group-level countdown breakpoint. All processes in the control group stop when any process in the group executes this statement for the number of times specified by expression.
$countthread expression
Sets a thread-level countdown breakpoint. When any thread in a process executes this statement for the number of times specified by expression, the thread stops. Other threads in the process continue to execute.
 
If the target system can not stop an individual thread, this statement performs identically to $countprocess.
 
A thread evaluates expression when it executes $count for the first time. This expression must evaluate to a positive integer. When TotalView first encounters this intrinsic, it determines a value for expression. TotalView will not reevaluate until the expression actually stops the thread. This means that TotalView ignores changes in the value of expression until it hits the breakpoint. After the breakpoint occurs, TotalView reevaluates expression and sets a new value for this statement.

The internal counter is stored in the process and shared by all threads in that process.
$hold
$holdprocess
Holds the current process. If all other processes in the group are already held at this Eval point, then TotalView will release all of them. If other processes in the group are running, they continue to run.
$holdstopall
$holdprocessstopall
Exactly like $hold, except any processes in the group which are running are stopped. Note that the other processes in the group are not automatically held by this call--they are just stopped.
$holdthread
Freezes the current thread, leaving other threads running.
$holdthreadstop
$holdthreadstopprocess
Exactly like $holdthread except it stops the process. The other processes in the group are left running.
$holdthreadstopall
Exactly like $holdthreadstop except it stops the entire group.
$stop
$stopprocess
Sets a process-level breakpoint. The process that executes this statement stops; other processes in the control group continue to execute.
$stopall
Sets a program-group-level breakpoint. All processes in the control group stop when any thread or process in the group executes this statement.
$stopthread
Sets a thread-level breakpoint. Although the thread that executes this statement stops, all other threads in the process continue to execute.
 
If the target system can not stop an individual thread, this statement performs identically to $stopprocess.
$visualize(expression[,slice])
Visualizes the data specified by expression and modified by the optional slice value. Expression and slice must be expressed using the code fragment's language. The expression must return a dataset (after modification by slice) that can be visualized. slice is a quoted string containing a slice expression. For more information on using $visualize in an expression, see Visualizing Data in Expressions.

 
 
 
 
support@etnus.com
Copyright © 2001, Etnus, LLC. All rights reserved.
Version 5.0