30.01.2013 Views

TotalView Users Guide - CI Wiki

TotalView Users Guide - CI Wiki

TotalView Users Guide - CI Wiki

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Using Watchpoints<br />

stored, <strong>TotalView</strong> doesn’t trigger the watchpoint because the location’s value<br />

did not change.<br />

For example, if location 0x10000 has a value of 0 and your program writes a<br />

value of 0 to this location, <strong>TotalView</strong> doesn’t trigger the watchpoint, even<br />

though your program wrote data to the memory location. See “Triggering<br />

Watchpoints” on page 377 for more details on when watchpoints trigger.<br />

You can also create conditional watchpoints. A conditional watchpoint is similar<br />

to a conditional breakpoint in that <strong>TotalView</strong> evaluates the expression when<br />

the value in the watched memory location changes. You can use conditional<br />

watchpoints for a number of purposes. For example, you can use one to test<br />

whether a value changes its sign—that is, it becomes positive or negative—or<br />

whether a value moves above or below some threshold value.<br />

Using Watchpoints on Different Architectures<br />

The number of watchpoints, and their size and alignment restrictions, differ<br />

from platform to platform. This is because <strong>TotalView</strong> relies on the operating<br />

system and its hardware to implement watchpoints.<br />

Watchpoints are not available on Macintosh computers running OS X, IBM PowerPC<br />

computers running Linux Power, and Hewlett Packard (HP) computers running HP-UX<br />

(PA-RISC).<br />

The following list describes constraints that exist on each platform:<br />

Computer Constraints<br />

HP Alpha Tru64 Tru64 places no limitations on the number of watchpoints that<br />

you can create, and no alignment or size constraints. However,<br />

watchpoints can’t overlap, and you can’t create a watchpoint on<br />

an already write-protected page.<br />

Watchpoints use a page-protection scheme. Because the page<br />

size is 8,192 bytes, watchpoints can degrade performance if your<br />

program frequently writes to pages that contains watchpoints<br />

IRIX6 MIPS Watchpoints are implemented on IRIX 6.2 and later operating<br />

systems. These systems let you create approximately 100<br />

watchpoints. There are no alignment or size constraints.<br />

However, watchpoints can’t overlap.<br />

IBM AIX You can create one watchpoint on AIX 4.3.3.0-2 (AIX 4.3R) or later<br />

systems running 64-bit chips. These are Power3 and Power4<br />

systems. (AIX 4.3R is available as APAR IY06844.) A watchpoint<br />

cannot be longer than 8 bytes, and you must align it within an 8byte<br />

boundary. If your watchpoint is less than 8 bytes and it<br />

doesn’t span an 8-byte boundary, <strong>TotalView</strong> figures out what to<br />

do.<br />

You can create compiled conditional watchpoints when you use<br />

this system. When watchpoints are compiled, they are evaluated<br />

by the process rather than having to be evaluated in <strong>TotalView</strong><br />

where all evaluations are single-threaded and must be sent from<br />

separately executing processes. Only systems having fast traps<br />

can have compiled watchpoints.<br />

374 Chapter 16: Setting Action Points

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

Saved successfully!

Ooh no, something went wrong!