Using Watchpoints on Different Architectures
The number of watchpoints, and their size and alignment restrictions, differ from platform to platform. This is because TotalView relies on the operating system and its hardware to implement watchpoints.
Watchpoint support depends on the target platform where your application is running, not on the host platform where TotalView is running. For example, if you are running TotalView on host platform "H" (where watchpoints are not supported), and debugging a program on target platform "T" (where watchpoints are supported), you can create a watchpoint in a process running on "T", but not in a process running on "H".
*Watchpoints are not available on the following target platforms: Mac OS X, and Linux-Power.
The following list describes constraints that exist on each platform:
Computer
Constraints
Blue Gene/L and Blue Gene/P
On Blue Gene/L and Blue Gene/P, you can create one watchpoint. TotalView sets the data address compare (DAC) registers of the PPC440 Embedded Processor to watch for memory writes to a range of addresses, specified by a watched address and length. The watchpoint triggers if the referenced data address is greater than or equal to the watched address and less than the watched address plus length.
Blue Gene/Q
On Blue Gene/Q, you can create two watchpoints. TotalView sets a watchpoint using the IBM CDTI debugging interface for memory writes to a range of addresses, specified by a watched address and length. The watchpoint triggers if the referenced data address is greater than or equal to the watched address and less than the watched address plus length. The watched length must be a power of 2, and the watched address must be aligned to that power of 2; that is, (address % length) == 0.
IBM AIX
You can create one watchpoint on AIX 4.3.3.0-2 (AIX 4.3R) or later systems running 64-bit chips. These are Power3 and Power4 systems. (AIX 4.3R is available as APAR IY06844.) A watchpoint cannot be longer than 8 bytes, and you must align it within an 8-byte boundary. If your watchpoint is less than 8 bytes and it doesn’t span an 8-byte boundary, TotalView figures out what to do.
You can create compiled conditional watchpoints when you use this system. When watchpoints are compiled, they are evaluated by the process rather than having to be evaluated in TotalView where all evaluations are single-threaded and must be sent from separately executing processes. Only systems having fast traps can have compiled watchpoints.
Linux x86
You can create up to four watchpoints and each must be 1, 2, or 4 bytes in length, and a memory address must be aligned for the byte length. That is, you must align a 4-byte watchpoint on a 4-byte address boundary, and you must align a 2-byte watchpoint on a 2-byte boundary, and so on.
Linux x86-64 (AMD and Intel)
You can create up to four watchpoints and each must be 1, 2, 4, or 8 bytes in length, and a memory address must be aligned for the byte length. For example, you must align a 4-byte watchpoint on a 4-byte address boundary.
HP-UX IA-64 and
Linux IA-64
You can create up to four watchpoints. The length of the memory being watched must be a power of 2 and the address must be aligned to that power of 2; that is, (address % length) == 0.
Solaris SPARC and Solaris x86
TotalView supports watchpoints on Solaris 7 or later operating systems. These operating systems let you create hundreds of watchpoints, and there are no alignment or size constraints. However, watchpoints can’t overlap.
Typically, a debugging session doesn’t use many watchpoints. In most cases, you are only monitoring one memory location at a time. Consequently, restrictions on the number of values you can watch seldom cause problems.