30.01.2013 Views

TotalView Users Guide - CI Wiki

TotalView Users Guide - CI Wiki

TotalView Users Guide - CI Wiki

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Stepping (Part I)<br />

� Set breakpoints at lines you choose, and let your program execute to<br />

that breakpoint. See “Setting Breakpoints and Barriers” on page 351.<br />

� Set conditional breakpoints that cause a program to stop after it evaluates<br />

a condition that you define, for example “stop when a value is less<br />

than eight. See “Setting Eval Points” on page 367.<br />

<strong>TotalView</strong> provides additional features for working with breakpoints, process<br />

barrier breakpoints, and eval points. For more information, see Chapter<br />

16, “Setting Action Points,” on page 349.<br />

Stepping (Part I)<br />

You can use <strong>TotalView</strong> stepping commands to:<br />

� Execute one source line or machine instruction at a time; for example,<br />

Process > Step in the GUI and dstep in the CLI.<br />

CLI: dstep<br />

� Run to a selected line, which acts like a temporary breakpoint; for example,<br />

Process > Run To.<br />

CLI: duntil<br />

� Run until a function call returns; for example, Process > Out.<br />

CLI: dout<br />

In all cases, stepping commands operate on the Thread of Interest (TOI). In<br />

the GUI, the TOI is the selected thread in the current Process Window. In<br />

the CLI, the TOI is the thread that <strong>TotalView</strong> uses to determine the scope of<br />

the stepping operation.<br />

On all platforms except SPARC Solaris, <strong>TotalView</strong> uses smart single-stepping<br />

to speed up stepping of one-line statements that contain loops and conditions,<br />

such as Fortran 90 array assignment statements. Smart stepping<br />

occurs when <strong>TotalView</strong> realizes that it doesn’t need to step through an<br />

instruction. For example, assume that you have the following statements:<br />

integer iarray (1000,1000,1000)<br />

iarray = 0<br />

These two statements define one billion scalar assignments. If your computer<br />

steps every instruction, you will probably never get past this statement. Smart<br />

stepping means that <strong>TotalView</strong> single-steps through the assignment statement<br />

at a speed that is very close to your computer’s native speed.<br />

<strong>TotalView</strong> <strong>Users</strong> <strong>Guide</strong>: version 8.7 253

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!