dactions
Displays information, and saves and reloads action points
Format
Displays information about action points.
dactions [ ap-id-list ] [ -at source-loc ] [ -full ] [ -enabled|-disabled] [ -enabled_blocks|-disabled_blocks]
[ ‑block_images|-block_lines]
Saves action points to a file.
dactions -save [ filename ]
Loads previously saved action points.
dactions -load[ filename ]
Suppresses or unsuppresses action points.
dactions [ -suppress | -unsuppress ]
Arguments
ap-id-list
A list of action point identifiers. If you specify individual action points, the information that appears is limited to these points.
Do not enclose this list within quotes or braces. See the examples at the end of this section for more information.
Without this argument, the CLI displays summary information about all action points in the processes in the focus set. If you enter one ID, the CLI displays full information for it. If you enter more than one ID, the CLI displays just summary information for each.
-at source-loc
Displays the action points at
source-loc. See
dbreakfor the details on the form of
source-loc.
-full
Displays complete, rather than summary, information about the action points in the current share group. Complete information is the default when dactions is used with a single action point argument. Use -full to display complete information when invoking dactions with no arguments, or with two or more action point arguments.
-enabled
Shows only enabled action points.
-disabled
Shows only disabled action points.
-suppress
Effectively disables all existing action points. If the code is run, threads will not stop at any action points. Although you can create new action points (and delete existing ones), the new action points too will be effectively disabled.
-unsuppress
Restores all action points to the state they were in when suppressed. Any new action points added are set as enabled.
-enabled_blocks
When displaying the full information for an action point, only shows the enabled address blocks. (See example below.)
-disabled_blocks
When displaying the full information for an action point, only shows the disabled address blocks. (See example below.)
-block_images
When displaying the full information for an action point, shows the image name of each address block.
-block_lines
When displaying the full information for an action point, shows the source line of each address block. If the source line is followed by a tilde, the breakpoint block address is approximate.
-save
Writes information about action points to a file.
-load
Restores action point information previously saved in a file.
filename
The name of the file into which TotalView reads and writes action point information. If you omit this file name, TotalView writes action point information to a file named program_name.TVD.v4breakpoints, where program_name is the name of your program.
Description
The dactions command displays information about action points in the processes in the current focus. If you do not indicate a focus, the default focus is at the process level. The full breakpoint specification is printed (not returned), including the canonical file name's path.
Using the Action Point Identifier
To get the action point identifier, just enter dactions with no arguments. You need this identifier to delete, enable, and disable action points.
The identifier is returned when TotalView creates the action point. The CLI prints this ID when the thread stops at an action point.
You can include action point identifiers as arguments to the command when more detailed information is needed. The -enabled and -disabled options restrict output to action points in one of these states.
You cannot use the dactions command when you are debugging a core file or before TotalView loads executables.
Saving and Loading Action Points
The -save option writes action point information to a file so that either you or TotalView can restore your action points later. The-loadoption immediately reads the saved file. Using the filename argument with either option writes to or reads from this file. If you do not use this argument, TotalView names the file program_name.TVD.v4breakpoints (where program_name is the name of your program), and writes it to the directory in which your program resides.
The information saved includes expressions associated with the action point and whether the action point is enabled or disabled. For example, if your program’s name is foo, TotalView writes this information to foo.TVD.v4breakpoints.
NOTE >> TotalView does not save information about watchpoints.
If a file with the default name exists, TotalView can read this information when it starts your program. When TotalView exits, it can create the default. For more information, see the File > Preference Action Points Page information in the TotalView for HPC online Help.
Suppressing and Unsuppressing Action Points
Suppress effectively disables all existing action points. If the code is run, threads will not stop at any action points. Although you can create new action points (and delete existing ones), the new action points too will be effectively disabled. Unsuppress restores all action points to the state they were in when suppressed. Any new action points added are set as enabled.
Command alias
Alias | Definition | Description |
ac | dactions | Displays all action points |
Examples
ac -at 81
Displays information about the action points on line 75. (This example uses the alias instead of the full command name.) Here is the output from this command:
d1.<> ac -at 75
1 shared action point for group 3:
1 [/home/totalview/tests/src/tx_blocks.cxx#75] Enabled
Address 0: [Enabled] main+0x1d0 (0x0040071c)
Share in group: true
Stop when hit: group
d1.<>
dactions 1 2
Displays information about action points 1 and 2, as follows:
d1.<> dactions 1 2
2 shared action points for group 3:
1 [/home/totalview/tests/src/tx_blocks.cxx#75] Enabled
2 [/home/totalview/tests/src/tx_blocks.cxx#48] Enabled
d1.<>
If you have saved a list of action points as a string or as a Tcl list, you can use the eval command to process the list’s elements.
For example:
d1.<> dactions
3 shared action points for group 3:
1 [/home/totalview/tests/src/tx_blocks.cxx#75] Enabled
2 [/home/totalview/tests/src/tx_blocks.cxx#69] Enabled
3 [/home/totalview/tests/src/tx_blocks.cxx#57] Enabled
d1.<> set group1 "2 3"
2 3
d1.<> eval ddisable $group1
d1.<> ac
3 shared action points for group 3:
1 [/home/totalview/tests/src/tx_blocks.cxx#75] Enabled
2 [/home/totalview/tests/src/tx_blocks.cxx#69] Disabled
3 [/home/totalview/tests/src/tx_blocks.cxx#57] Disabled
dfocus p1 dactions
Displays information about all action points defined in process 1.
d1.<> dfocus p1 dactions
3 shared action points for group 3:
1 [/home/totalview/tests/src/tx_blocks.cxx#75] Enabled
2 [/home/totalview/tests/src/tx_blocks.cxx#69] Disabled
3 [/home/totalview/tests/src/tx_blocks.cxx#57] Disabledd1.<>
dfocus p1 dactions -enabled
Displays information about all enabled action points in process 1
dactions -full
Displays more complete information about the action points. Here is an example of the output:
d1.<> dactions -full
3 shared action points for group 3:
1 [/home/totalview/tests/src/tx_blocks.cxx#75] Enabled
Address 0: [Enabled] main+0x1d0 (0x0040071c)
Share in group: true
Stop when hit: group
2 [/home/totalview/tests/src/tx_blocks.cxx#69] Disabled
Address 0: [Enabled] main+0x189 (0x004006d5)
Share in group: true
Stop when hit: process
3 [/home/totalview/tests/src/tx_blocks.cxx#57] Disabled
Address 0: [Enabled] main+0x9f (0x004005eb)
Address 1: [Enabled] main+0x257 (0x004007a3)
Address 2: [Disabled] main+0x266 (0x004007b2)
Share in group: true
Stop when hit: process
Examples of Action Points in Both Host and Dynamically Loaded Code
These examples show the
dactions output for a program that dynamically loads code at runtime. In this case, an action point may contain a mixture of host and dynamically-loaded code address blocks, some of which may be identified as pending.
(See “Pending Breakpoints”in the TotalView User Guide.) Note that these examples are for a CUDA program, but are relevant to any code loaded dynamically.
Both examples use -block_lines with -full to display the source line for each address block.
Pending and Mixed Breakpoint Example
Action points consisting only of invalid/nullified blocks are displayed as Pending:
dactions -full -block_lines
d1.<> dactions -full -block_lines
2 shared action points for group 3:
1 [/home/nvidia6/totalview/tests/src/tx_cuda.cu#218] Enabled
Pending
Share in group: true
Stop when hit: process
2 [/home/nvidia6/totalview/tests/src/tx_cuda.cu#219] Enabled
Address 0: [Disabled] ScrambleKernel+0x19, src/tx_cuda.cu#228
(0x00403998)
Address 1: [Enabled] ScrambleKernel+0x450, ../../src/tx_cuda.cu#220
(Location not mapped)
Address 2: [Enabled] ScrambleKernel+0x1c50, ../../src/tx_cuda.cu#220
(Location not mapped)
Share in group: true
Stop when hit: process
d1.<>
Note that:
Action point 1 has no valid address blocks, so is listed as Pending.
Action point 2 contains a mixture of host and GPU address blocks:
— Block 0 originally slid to line 228, but was disabled when the GPU code was loaded and TotalView found a better match at line 220.
(See “Sliding Breakpoints” in the TotalView User Guide.) — Block 1 and 2 show "Location not mapped" because the CLI focus was on the process, not the CUDA thread. Using dfocus t1.-1 dactions … would provide the GPU address.
Nullified and Pending Breakpoint Example
In this example, lines 220 and 221 contain “for” loops in the CUDA GPU code (a “for” loop typically has multiple line number symbols):
d1.<> l 218 -n 5
218
219 /* Loop over all elements of the matrix, scrambling them */
220 for (int i = start_i; i < A.width; i++)
221 for (int j = 0; j < A.width; j++)
222
Set some breakpoints:
d1.<> b 220
1
d1.<> b 221
2
Use -full and -block_lines to view the breakpoint’s source lines and addresses:
d1.<> ac -full -block_lines
2 shared action points for group 3:
1 [/home/nvidia6/totalview/tests/src/tx_cuda.cu#220] Enabled
Pending
Share in group: true
Stop when hit: process
2 [/home/nvidia6/totalview/tests/src/tx_cuda.cu#221] Enabled
Address 0: [Enabled] ScrambleKernel+0x19, src/tx_cuda.cu#228 0x00403998)
Share in group: true
Stop when hit: process
Note that:
• Creating the action point 1 at line 220 in the GPU code caused it to slide to line 228 in the host code.
• Creating the action point 2 at line 221 in the GPU code caused it to slide to line 228 in the host code and nullified address block 0 in action point 1, which caused it to become pending.
Continue the process so that the GPU code is loaded and a CUDA thread stops at line 220, then view the output again:
...
Thread 1.-1 hit breakpoint 1 at line 220 in "ScrambleKernel(Matrix,int)"
d1.<> ac -full -block_lines
2 shared action points for group 3:
1 [/home/nvidia6/totalview/tests/src/tx_cuda.cu#220] Enabled
Address 0: (Nullified)
Address 1: [Enabled] ScrambleKernel+0x450, ../../src/tx_cuda.cu#220 (0x00dacfb0)
Address 2: [Enabled] ScrambleKernel+0x1c50, ../../src/tx_cuda.cu#220 (0x00dae7b0)
Share in group: true
Stop when hit: process
2 [/home/nvidia6/totalview/tests/src/tx_cuda.cu#221] Enabled
Address 0: [Disabled] ScrambleKernel+0x19, src/tx_cuda.cu#228 (0x00403998)
Address 1: [Enabled] ScrambleKernel+0x568, ../../src/tx_cuda.cu#221 (Location not mapped)
Address 2: [Enabled] ScrambleKernel+0x1c18, ../../src/tx_cuda.cu#221 (Location not mapped)
Share in group: true
Stop when hit: process
d1.<>
Loading the GPU code caused the action points to be reevaluated, thus adjusting their address blocks:
• Action point 1 added two address blocks for line 220, and thus is no longer pending. Note that this action point contains a mixture of valid and nullified blocks, therefore dactions lists address block 0 as Nullified rather than listing the entire breakpoint as Pending.
• Action point 2 added two address blocks for line 221, and block 0 was disabled because better matching line number symbols were added.
Extended example using -enabled_blocks and -disabled_blocks
dactionsn [-enabled_blocks|]
This extended example demonstrates the use of these two options.
Set a break point:
d1.<> b {bar<std::vector<int, std::allocator<int> > >::bar(int)}
Incorporating 10079 bytes of DWARF '.debug_info' information for tx_test2.cxx (linenumber)...done
1
Entering dactions reports on only the top-level action point associated with this action point number:
d1.<> dactions
1 shared action point for group 3:
1 [bar<std::vector<int,\ std::allocator<int>\ >\ >::bar(int)] Enabled
Entering dactions n reports on all action point instances (the address block) associated with this action point number:
d1.<> dactions 1
1 shared action point for group 3:
1 [bar<std::vector<int,\ std::allocator<int>\ >\ >::bar(int)] Enabled
Address 0: [Enabled] bar<std::vector<int,std::allocator<int> > >::bar+0x12 (0x004013d2)
Address 1: [Enabled] bar<std::vector<int,std::allocator<int> > >::bar+0x84 (0x00401444)
Address 2: [Disabled] bar<std::vector<double,std::allocator<double> > >::bar+0x12 (0x00401496)
Address 3: [Disabled] bar<std::vector<double,std::allocator<double> > >::bar+0x86 (0x0040150a)
Share in group: true
Stop when hit: process
Using -enabled_blocks reports on only enabled action point instances (the address block) associated with this action point number:
d1.<> dactions 1 -enabled_blocks
1 shared action point for group 3:
1 [bar<std::vector<int,\ std::allocator<int>\ >\ >::bar(int) Enabled
Address 0: [Enabled] bar<std::vector<int,std::allocator<int> > >::bar+0x12 (0x004013d2)
Address 1: [Enabled] bar<std::vector<int,std::allocator<int> > >::bar+0x84 (0x00401444)
Share in group: true
Stop when hit: process
Using -disabled_blocks reports on only disabled action point instances (the address block) associated with this action point number:
d1.<> dactions 1 -disabled_blocks
1 shared action point for group 3:
1 [bar<std::vector<int,\ std::allocator<int>\ >\ >::bar(int)] Enabled
Address 2: [Disabled] bar<std::vector<double,std::allocator<double> > >::bar+0x12 (0x00401496)
Address 3: [Disabled] bar<std::vector<double,std::allocator<double> > >::bar+0x86 (0x0040150a)
Share in group: true
Stop when hit: process
d1.<>
You could use this information, for example, to enable the currently disabled action point addresses:
d1.<> denable -block 2 3
Related Topics