TotalView 6.3.1-1-LLNL
Release Features

February 24, 2004

TotalView is a product of Etnus, LLC.

This documents the release of TotalView 6.3.1-1-LLNL installed originally as newtv and newtvcli and then as totalview and totalviewcli on February 26, 2004, on OCF and SCF LC platforms.

TotalView 6.3.1-0-LLNL Release

Improvements in Etnus 6.3.1-1

New Heap Debugging Features in Etnus 6.3.1-1

LLNL Implemented Features


TotalView Debugger Tutorial by Blaise Barney
TotalView Quick Reference Page
TotalView CLI Summary Sheet

For problems/questions, send e-mail to Matt Wolfe, Dong Ahn, Karen Warren (LLNL) or Laurie McGavran (LANL).

New Web-based Online Help

TotalView works better with Mozilla. Type

setenv TV_HTMLHELP_VIEWER mozilla ;

Help is faster if you already have Mozilla running.


Leak Detection

  1. You may choose to check for memory leaks throughout your entire code or within a section of your code. The following example checks for leaks from the first executable line to a breakpoint.
  2. Type the following CLI commands that set a breakpoint, enable memory debugging. and run to the breakpoint:

    dbreak 34
    dheap -enable

  3. Look for the leaks by typing:

    dheap -leaks

    The figure below shows that nine leaks were detected, and that there were 450 bytes leaked. It also shows the size of the smallest and largest leak in addition to their average size.


Dangling Pointer Detection

  1. TotalView can identify pointers that do not point to allocated heap memory. The following example demonstrates this for two pointer variables, addr and misaddr.
  2. Set up the Memory Tracker by selecting Tools > Enable Memory Debugging.
    Tools > Stop on Memory Errors
    should automatically be set. If Stop on Memory Errors is not set, please set it.
  3. At a breakpoint after memory allocation, dive on the addr and misaddr variables.

    Notice that the values now contain (Allocated) and (Allocated Interior). Keep these variable windows up.

  4. Continue program execution to a breakpoint after the memory has been freed by again selecting the Go command from the Toolbar. The addr and misaddr variable value information now contains (Dangling) and (Dangling Interior).


Heap Memory Block Painting

  1. Memory block painting can be used to cause a program error when the program references an uninitialized block of heap memory or makes a reference to an already deallocated heap block. The user specifies the bit patterns to be used for allocated and deallocated blocks.
  2. Enable heap debugging by selecting the Tools > Enable Memory Debugging command. Or, you could type dheap -enable within the CLI.
  3. Check the block painting status:

    dheap -paint

    Note that the Alloc and Dealloc patterns are shown as <default> because the process has not yet been run. TotalView only sets the patterns after the process begins executing.

  4. Step to the first line in main() by selecting Step button in the Toolbar or using the dstep command.
  5. Recheck block painting status:

    dheap -paint

    You are now seeing the default patterns.

  6. Enable painting for allocation and deallocation:

    dheap -paint -enable_alloc -enable_dealloc

  7. Select a line after the first malloc() and then select Run To from the Toolbar. Or, type duntil [source line number of desired bkp] in the CLI.
  8. Look at the memory pointed to by diving on a pointer that references it, .e.g., snooker_ball_t, then diving on the pointer.

    Note how TotalView had painted the memory using its allocate pattern.

  9. You can change the allocation and deallocation pattern. For example:

    dheap -paint -set_alloc_pattern 0x11111111
    dheap -paint -set_dealloc_pattern 0x22222222

    Or you can use a different pattern.


Man Page for Memory Debugging


setenv MANPATH /usr/local/tv/dflt/man ; man dheap


Release Status for Requested Features

Function Release Approx Date
Single Click Dive (middle mouse button) totalview default
Automatic saving of breakpoints totalview default
Display structure members as arrays totalview default
Display pointers as arrays option totalview default
Remember data window layout totalview default
Display lightweight core file stack traces totalview default
Avoid display of poe window totalview default
Parallel evaluation of expressions totalview default
Expression window scrollbars totalview default
Heap allocation debugging totalview default
Automatically find source search path totalview default
Support for IA/64 totalview default
Multi-column displays TV6.4 betatv
Multi-variable window TV6.4 betatv
Sort variables in stack frame TV6.5 May 2004
Evaluation of C++ methods in eval expressions TV6.6 Summer 2004
Use of F90 array syntax in eval expressions TV6.6 Summer 2004
Saving of context between restarts TV7.0? Fall 2004?


Administrative Information

Privacy & Legal Notice