TotalView understands pointer-to-shared data and displays the components of the data, as well as the target of the pointer to shared variables. For example,Figure 251 shows this data being displayed:
Figure 251 – A Pointer to a Shared Variable
In this figure, notice the following:
• Because the Type field displays the full type name, this is a pointer to a shared int with a block size of 10.
• TotalView also displays the upc_threadof ("T0"), the upc_phaseof ("P0"), and the upc_addrfield (0x0x10010ec4) components of this variable.
In the same way that TotalView normally shows the target of a pointer variable, it also shows the target of a UPC pointer variable. When dereferencing a UPC pointer, TotalView fetches the target of the pointer from the UPC thread with which the pointer has affinity.
You can update the pointer by selecting the pointer value and editing the thread, phase, or address values. If the phase is corrupt, you’ll see something like the following in the Value area:
T0;P6;0x3ffc0003b00 <Bad phase [max 4]> ->
0xc0003c80 (-1073726336)
In this example, the pointer is invalid because the phase is outside the legal range. TotalView displays a similar message if the thread is invalid.
Since the pointer itself is not shared, you can use the TView > Show Across commands to display the value from each of the UPC threads.