pm_get_data, pm_get_tdata, pm_get_Tdata, pm_get_data_cpu, pm_get_tdata_cpu, pm_get_Tdata_cpu, pm_get_data_lcpu, pm_get_tdata_lcpu and pm_get_Tdata_lcpu Subroutine

Purpose

Returns systemwide Performance Monitor data.

Library

Performance Monitor APIs Library (libpmapi.a)

Syntax

#include <pmapi.h>

int pm_get_data ( *pmdata)
pm_data_t *pmdata;

int pm_get_tdata (pmdata, * time)
pm_data_t *pmdata;
timebasestruct_t *time;

int pm_get_Tdata (pmdata, * times)
pm_data_t *pmdata;
pm_accu_time_t *times;

int pm_get_data_cpu (cpuid, *pmdata)
int cpuid;
pm_data_t *pmdata;

int pm_get_tdata_cpu (cpuid, *pmdata, *time)
int cpuid;
pm_data_t *pmdata;
timebasestruct_t *time;

int pm_get_Tdata_cpu (cpuid, *pmdata, *times)
int cpuid;
pm_data_t *pmdata;
pm_accu_time_t *times
int pm_get_data_lcpu (lcpuid, *pmdata)
int lcpuid;
pm_data_t *pmdata;

int pm_get_tdata_lcpu (lcpuid, *pmdata, *time)
int lcpuid;
pm_data_t *pmdata;
timebasestruct_t *time;

int pm_get_Tdata_lcpu (lcpuid, *pmdata, *times)
int lcpuid;
pm_data_t *pmdata;
pm_accu_time_t *times

Description

The pm_get_data subroutine retrieves the current systemwide Performance Monitor data.

The pm_get_tdata subroutine retrieves the current systemwide Performance Monitor data, and a timestamp indicating the last time the hardware counters were read.

The pm_get_Tdata subroutine retrieves the current systemwide Performance Monitor data, and the accumulated time (timebase, PURR time and SPURR time) the events were counted.

The pm_get_data_cpu, pm_get_tdata_cpu, and pm_get_Tdata_cpu subroutines retrieve the current Performance Monitor data for a specified processor. The given processor ID represents a contiguous number ranging from 0 to _system_configuration.ncpus. These subroutines can only be used when no Dynamic Reconfiguration operations are made on the machine, because when processors are added or removed, the processor numbering is modified and the specified processor number can designate different processors from one call to another. These subroutines are maintained for compatibility with previous versions.

The pm_get_data_cpu subroutine retrieves the current Performance Monitor data for the specified processor.

The pm_get_tdata_cpu subroutine retrieves the current Performance Monitor data for the specified processor, and a timestamp indicating the last time the hardware counters were read.

The pm_get_Tdata_cpu subroutine retrieves the current Performance Monitor data for the specified processor, and the accumulated time (timebase, PURR time and SPURR time) the events were counted.

The pm_get_data_lcpu, pm_get_tdata_lcpu, and pm_get_Tdata_lcpu subroutines retrieve the current Performance Monitor data for a specified logical processor. The given processor ID represents a value ranging from 0 to _system_configuration.max_ncpus. This value always represents the same processor, even after Dynamic Reconfiguration operations have occurred. These subroutines might return an error if the specified logical processor number has never run during the counting interval.

The pm_get_data_lcpu subroutine retrieves the current Performance Monitor data for the specified logical processor.

The pm_get_tdata_lcpu subroutine retrieves the current Performance Monitor data for the specified logical processor, and a timestamp indicating the last time the hardware counters were read.

The pm_get_Tdata_lcpu subroutine retrieves the current Performance Monitor data for the specified logical processor, and the accumulated time (timebase, PURR time and SPURR time) the events were counted.

The Performance Monitor data is always a set (one per hardware counter on the machines used) of 64-bit values.

Parameters

Item Description
*pmdata Pointer to a structure that contains the returned systemwide Performance Monitor data.
*time Pointer to a structure containing the timebase value the last time the hardware Performance Monitoring counters were read. This can be converted to time using the time_base_to_time subroutine.
*times Pointer to a structure containing the accumulated time (timebase, PURR time and SPURR time) the events were counted. Each time counter can be converted to time using the time_base_to_time subroutine.
cpuid Contiguous processor numbers ranging from 0 to _system_configuration.ncpus. This value does not always designate the same processor, even after Dynamic Reconfiguration operations have occurred.
lcpuid Logical processor identifier. Each identifier stays linked to a particular processor between reboots, even after Dynamic Reconfiguration operations. This value must be in the range from 0 to _system_configuartion.max_ncpus.

Return Values

Item Description
0 Operation completed successfully.
Positive error code Refer to the pm_error Subroutine to decode the error code.

Error Codes

Refer to the pm_error Subroutine.

Files

Item Description
/usr/include/pmapi.h Defines standard macros, data types, and subroutines.