With the IBM System z10 machine (or later hardware) the CPU Measurement Facility (CPU MF) allows for the collection of hardware counter and sample data. Counter data provides actual counts of key hardware events, including cycles, instructions, and cache misses. Sample data includes information about the address space and the instruction being executed on a CPU at the time of each sample. By using CPU MF sample data, it is possible to sample the instruction addresses running on each CPU, and this information can be used to determine what code on the system is consuming the most CPU resources. With CPU MF, sampling is done by the hardware, reducing the overhead and eliminating some of the problems with software based sampling which can skew results. Also, CPU MF samples contain information about frequency of instructions as well as CPU time of instructions.
Hardware Instrumentation Services (HIS) is support built into the z/OS operating system to allow customers to capture CPU MF information, both counter data and sample data. In addition, HIS allows a z/OS Operator to capture information about the address ranges of various modules loaded on the system.
The Report Generator for Hardware Instrumentation Sample Data is a sample program to demonstrate the value of CPU MF Sample data. If you find this information valuable, please consider contacting STG Lab Services for a service contract exploiting this information. Alternatively, you may choose to purchase a vendor product which exploits this data.
The tool, Report Generator for Hardware Instrumentation Sample Data, is a simple program which takes CPU MF sample data and the map of executable module locations provided by z/OS Hardware Instrumentation Services, merges this information to determine the number of samples in each module, and produces a simple report showing the CPU time spent in the various modules on the system. Optionally, the user can specify a Home Address Space ID to request that only samples running under that address space will be included in the analysis.
The intent of this basic tool is to demonstrate the type of analysis which can be done using CPU MF Sample data produced by z/OS Hardware Instrumentation Services. It's our hope that this will encourage others to more fully exploit this useful information.
Bob St. John is a STSM in System z Performance and Performance Tools from the IBM lab in Poughkeepsie, NY. He has over 28 years of experience with MVS and z/OS, improving the performance of various IBM Software products and improving the tools used to analyze and improve performance.