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.

Defining Eval Points and Conditional Breakpoints<br />

This effectively replaces the if statement on line 4 with the code in the eval<br />

point.<br />

About Interpreted and Compiled Expressions<br />

On all platforms, <strong>TotalView</strong> can interpret your eval points. It can compile<br />

them on HP Alpha Tru64 UNIX, IBM AIX, and SGI IRIX platforms. On HP<br />

Alpha Tru64 UNIX and IBM AIX platforms, compiling the expressions in eval<br />

points is the default.<br />

If your platform supports compiled eval points, your performance will be<br />

significantly better, particularly if your program is using multi-processors.<br />

This is because interpreted eval points are single-threaded through the<br />

<strong>TotalView</strong> process. In contrast, compiled eval points execute on each processor.<br />

The TV::compile_expressions CLI variable enables or disables compiled<br />

expressions. See “Operating Systems” in the <strong>TotalView</strong> Reference <strong>Guide</strong> for information<br />

about how <strong>TotalView</strong> handles expressions on specific platforms.<br />

Using any of the following functions forces <strong>TotalView</strong> to interpret the eval point rather<br />

than compile it: $clid, $duid, $nid, $processduid, $systid, $tid, and $visualize.<br />

In addition, $pid forces interpretation on IBM AIX.<br />

About Interpreted Expressions<br />

Interpreted expressions are interpreted by <strong>TotalView</strong>. Interpreted expressions<br />

run slower, possibly much slower, than compiled expressions. With multiprocess<br />

programs, interpreted expressions run even more slowly because<br />

processes may need to wait for <strong>TotalView</strong> to execute the expression.<br />

When you debug remote programs, interpreted expressions always run<br />

slower because the <strong>TotalView</strong> process on the host, not the <strong>TotalView</strong> server<br />

(tvdsvr) on the client, interprets the expression. For example, an interpreted<br />

expression could require that 100 remote processes wait for the<br />

<strong>TotalView</strong> process on the host machine to evaluate one interpreted expression.<br />

In contrast, if <strong>TotalView</strong> compiles the expression, it evaluates them on<br />

each remote process.<br />

Whenever a thread hits an interpreted eval point, <strong>TotalView</strong> stops execution. This means<br />

that <strong>TotalView</strong> creates a new set of lockstep groups. Consequently, if goal threads contain<br />

interpreted patches, the results are unpredictable.<br />

About Compiled Expressions<br />

<strong>TotalView</strong> compiles, links, and patches expressions into the target process.<br />

Because the target thread executes this code, eval points and conditional<br />

breakpoints execute very quickly. (Conditional watchpoints are always<br />

interpreted.) Also, this code doesn’t need to communicate with the<br />

<strong>TotalView</strong> host process until it needs to.<br />

370 Chapter 16: Setting Action Points

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

Saved successfully!

Ooh no, something went wrong!