2:620
Volume 2, Part 2: Performance Monitoring Support
The PAL firmware provides information about the performance monitor registers that
are implemented on the processor through the PAL_PERF_MON_INFO PAL call.
Information provided by the PAL includes bit masks which indicate which PMC/PMD
registers are implemented on this processor model, as well as the implemented number
of generic PMC/PMD pairs, and the counter width of the generic counters.
12.2
Operating System Support
The monitoring mechanisms discussed in the previous section support two performance
monitoring usage models that need support from an Itanium architecture-based
operating system.
• Per Thread/Process Event Monitoring
To monitor processor events per thread the operating system needs to save and restore
performance monitor state at thread/process context switches. This save/restore of
PMC and PMD registers only needs to be done for monitored threads. The effect of the
save/restore is that when a monitored thread is running, PMD reads will reflect events
for the monitored thread/process only.
Section 7.2.4.2, “Performance Monitor Context
defines the steps required for per-thread context switch of performance
monitors. It is worth noting that the PMC/PMD masks returned from
PAL_PERF_MON_INFO indicate which PMC/PMD registers are implemented. The context
switch routine can use the mask to save/restore implemented monitors without
knowing the function of the monitors.
• System Wide Event Monitoring
To monitor processor events system wide (across all processes and the operating
system kernel itself), a monitor must be enabled continuously across all contexts. This
can be achieved by configuring a privileged monitor (PMC.pm=1), and by ensuring that
PSR.pp and DCR.pp remain set for the duration of the monitor session. Since the
operating system typically reloads PSR and possibly DCR on context switch, this
requires the operating system to set PSR.pp and DCR.pp for all contexts that are active
during the monitoring session. One way to accomplish this is to have code in the
context switch routine to always set PSR.pp and DCR.pp when system wide monitoring
is in effect. Another technique is to set the initial state for all new threads/processes to
PSR.pp=1, PSR.up=0, PSR.sp=0 and DCR.pp=1. Setting the per thread PSR and DCR
in this way ensures that privileged monitors will be enabled across all contexts. When
system wide monitoring is in effect, PSR.pp, DCR.pp as well as the PMC and PMD
registers should not be altered by the context switch routine.
To support both per thread and system wide monitoring, the operating system needs to
be aware which type of monitoring is being performed at any given moment. If per
thread/process monitoring is active, then the operating system must save/restore
monitor state for monitored threads. If system wide monitoring is active, then the
operating system must ensure that PSR.pp and DCR.pp remain set.
The preferred approach for performance monitoring is for Itanium architecture-based
operating systems to provide a set of kernel mode services that allow performance
monitoring software to be implemented in a loadable device driver. Such a loadable
device driver can support various usage monitoring models, can be adapted to
Summary of Contents for ITANIUM ARCHITECTURE - SOFTWARE DEVELOPERS VOLUME 3 REV 2.3
Page 1: ......
Page 11: ...x Intel Itanium Architecture Software Developer s Manual Rev 2 3 ...
Page 13: ...1 2 Intel Itanium Architecture Software Developer s Manual Rev 2 3 ...
Page 33: ...1 22 Volume 1 Part 1 Introduction to the Intel Itanium Architecture ...
Page 57: ...1 46 Volume 1 Part 1 Execution Environment ...
Page 147: ...1 136 Intel Itanium Architecture Software Developer s Manual Rev 2 3 ...
Page 149: ...1 138 Volume 1 Part 2 About the Optimization Guide ...
Page 191: ...1 180 Volume 1 Part 2 Predication Control Flow and Instruction Stream ...
Page 230: ......
Page 248: ...236 Intel Itanium Architecture Software Developer s Manual Rev 2 3 ...
Page 250: ...2 2 Intel Itanium Architecture Software Developer s Manual Rev 2 3 ...
Page 264: ...2 16 Volume 2 Part 1 Intel Itanium System Environment ...
Page 380: ...2 132 Volume 2 Part 1 Interruptions ...
Page 398: ...2 150 Volume 2 Part 1 Register Stack Engine ...
Page 486: ...2 238 Volume 2 Part 1 IA 32 Interruption Vector Descriptions ...
Page 750: ...2 502 Intel Itanium Architecture Software Developer s Manual Rev 2 3 ...
Page 754: ...2 506 Volume 2 Part 2 About the System Programmer s Guide ...
Page 796: ...2 548 Volume 2 Part 2 Interruptions and Serialization ...
Page 808: ...2 560 Volume 2 Part 2 Context Management ...
Page 842: ...2 594 Volume 2 Part 2 Floating point System Software ...
Page 850: ...2 602 Volume 2 Part 2 IA 32 Application Support ...
Page 862: ...2 614 Volume 2 Part 2 External Interrupt Architecture ...
Page 870: ...2 622 Volume 2 Part 2 Performance Monitoring Support ...
Page 891: ......
Page 1099: ...3 200 Volume 3 Instruction Reference padd Interruptions Illegal Operation fault ...
Page 1295: ...3 396 Volume 3 Resource and Dependency Semantics ...
Page 1296: ......
Page 1302: ...402 Intel Itanium Architecture Software Developer s Manual Rev 2 3 ...
Page 1494: ...4 192 Volume 4 Base IA 32 Instruction Reference FWAIT Wait See entry for WAIT ...
Page 1647: ...Volume 4 Base IA 32 Instruction Reference 4 345 ROL ROR Rotate See entry for RCL RCR ROL ROR ...
Page 1884: ...4 582 Volume 4 IA 32 SSE Instruction Reference ...
Page 1885: ...Index Intel Itanium Architecture Software Developer s Manual Rev 2 3 Index ...
Page 1886: ...Index Intel Itanium Architecture Software Developer s Manual Rev 2 3 ...
Page 1898: ...INDEX Index 12 Index for Volumes 1 2 3 and 4 ...