How to Use TotalView at D0

This is an example on how to use TotalView at D0

First setup your Environment:
>  setup D0RunII <version> 
>  setup totalview 
You can use

> man totalview

for brief documents on totalview.

Then Run TotalView:

(If your program is compiled and linked using SRT, you can directly start totalview by using the following command, because all the compiling switches needed by totalview are already in SRT.)

>  totalview myprogram.x 
You will get a window pop up saying "Source file 'main.c' was not found, ...". click on continue button in this window.

Two new windows will pop up. The small one is the Root Window for controling your totalview session. The big one is a multi-part window, Process Window, for you to browse the code, stack, local values, thread and action point list.

type f

Another narrow window will pop up saying: "Function to view...".

type main and click the ok button.

The new question window will list two main functions. You select the main of framework.cpp and click the ok button.

Now you should be able to see the D0 framework code on your window.

type a to get an argument window.

type -rcp myprogram.rcp in the argument window and click on the ok button.

Now you are ready to run your program in totalview.

You can set a breakpoint by clicking on a line number (clicking on a line number which is already set as a breakpoint will cancel the breakpoint).

type g to run your program. It will stop at your breakpoint.

To examine a value of a variable, you can use the right button on the mouse to click on the variable name in the code or in the local variable window in the upper right corner.

The Stack Trace window shows the calling function list. Clicking on a function name in the stack will show that function's code.

Type s to step into a function.

Type n to step over a function.

Type ctrl-Z

and type g

to restart your program.

Type ctrl-? to see the online help.

If you want to get one of your code into the code display window,

type f

enter a method name or a constructor name from your code in the function question window. Rememeber, you need to enter the full name of the methold, including namespace. e.g. tauid::TauTrackFinder::getTauTracks .


You can also directly run TotalView on a core dump.

> totalview myprogram core


Just playing with the mouse buttons, you can get what you want to do in the totalview.


Please let me (qzli@fnal.gov) know how do you like TotalView .
This page is maintained by Qizhong Li
Last modified: Thu Aug 5 11:45:15 CDT 2004