dcalltree
Displays parallel backtrace data
Format:
dcalltree [-data pbv_data_array] [-show_details] [-sort columns] [-hide_backtrace]
[-save_as_csv filename] [-save_as_dot filename]
Arguments:
-data pbv_data_array
Captures the data from calling dcalltree in an associative Tcl array rather than writing the data to the console.
-show_details
Displays the data with all processes and threads displayed.
-hide_backtrace
Displays the data with only root and leaf nodes displayed.
-sort column
Sorts the data display based on the data in a particular column. The possible arguments are Processes, Location, PC, Host, Rank, ID, and Status.
-save_as_csv filename
Saves the backtrace data as a file of comma-separated values under the name filename.
-save_as_dot filename
Saves the backtrace data as a dot file under the name filename. Dot is a plain text graph description language.
Description:
The TotalView GUI has a Parallel Backtrace View window that displays the state of every process and thread in a parallel job. The dcalltree command makes this same data available either in the console window, or, with the -data switch, as a Tcl associative array.
The associative array has the following format:
{
{
Key <value>
Level <value>
Processes <value>
Location <value>
PC <value>
Host <value>
Rank <value>
ID <value>
Status <value>
}
{
...
}
}
The -show_details and -hide_backtrace switches pull in opposite directions. The -show_details switch shows the maximum data, including all processes and threads. The -hide_backtrace command hides any intermediate nodes, displaying only the root and leaf nodes. If used together, this results in a display of root and leaf nodes and all threads. This reduction can help to de-clutter the data display if the number of processes and threads is large.
Examples:
dcalltree
Calling dcalltree without switches results in a display such as this:
Processes Location PC Host Rank ID Status
--------- -------- -- ---- ---- -- ------
6 _start ... ... ... ... ...
6 _libc_start_main ... ... ... ... ...
4 main 0x00402b1c ... ... ... Breakpoint
2 sleep ... ... ... ... ...
2 _nanosleep_nocancel ... ... ... ... Running
dcalltree -show_details
By adding the -show_details, switch, you get more complete output:
Processes Location PC Host Rank ID Status
--------- -------- -- ---- ---- -- ------
6 _start ... ... ... ... ...
6 _libc_start_main ... ... ... ... ...
4 main 0x00402b1c ... ... ... Breakpoint
- main#70 0x00402b1c <local> 2 3.1 47567000944416 Breakpoint
- main#70 0x00402b1c <local> 4 5.1 47434069024544 Breakpoint
- main#70 0x00402b1c ushanka 3 4.1 47864373239520 Breakpoint
- main#70 0x00402b1c ushanka 5 6.1 46935597211360 Breakpoint
2 sleep ... ... ... ... ...
2 _nanosleep_nocancel ... ... ... ... Running
- _nanosleep_nocancel 0x2ae9d1cc9ea0 <local> 0 1.1 47183737360160 Running
- _nanosleep_nocancel 0x33fd499730 ushanka 1 1.1 47265758723808 Running
dcalltree -show_details -hide_backtrace
Adding the -hide_backtrace switch reduces the clutter somewhat:
Processes Location PC Host Rank ID Status
--------- -------- -- ---- ---- -- ------
6 _start ... ... ... ... ...
4 main 0x00402b1c ... ... ... Breakpoint
- main#70 0x00402b1c <local> 2 3.1 47567000944416 Breakpoint
- main#70 0x00402b1c <local> 4 5.1 47434069024544 Breakpoint
- main#70 0x00402b1c ushanka 3 4.1 47864373239520 Breakpoint
- main#70 0x00402b1c ushanka 5 6.1 46935597211360 Breakpoint
2 _nanosleep_nocancel ... ... ... ... Running
- _nanosleep_nocancel 0x2ae9d1cc9ea0 <local> 0 1.1 47183737360160 Running
- _nanosleep_nocancel 0x33fd499730 ushanka 1 1.1 47265758723808 Running
Here is code to get the location of all threads that are at a breakpoint:
dcalltree -data pbv_data_array -show_details
foreach { data_record } [array get pbv_data_array] {
set print_location 0
set break_location
foreach {title value} $data_record {
if {$title == "Location"} {
set break_location $value
}
if {$value == "Breakpoint"} {
set print_location 1
}
if {1 == $print_location} {
puts stdout "Breakpoint found at $break_location"
set print_location 0
}
}
}
- Related Topics