Retrieves system wide Performance Monitor settings in counter multiplexing mode and in multi-mode.
Performance Monitor APIs Library (libpmapi.a)
The pm_get_program_mx and pm_get_program_mm subroutines retrieve the current system wide Performance Monitor settings. This includes mode information and the events being counted, which are in an array of list of event identifiers. The identifiers come from the lists returned by the pm_initialize subroutine. When you use the pm_get_program_mm subroutine for multi-mode counting, a mode is associated to each event list.
The counting mode includes the user mode, the kernel mode, the current counting state, and the process tree mode. If the process tree mode is set, the counting applies only to the calling process and its descendants.
If the list includes an event which can be used with a threshold (as indicated by the pm_init subroutine), a threshold value is also returned.
If the events are represented by a group ID, then the is_group bit is set in the mode, and the first element of each events array contains the group ID. The other elements of the events array are not used.
The user application must free the array allocated to store the event lists (events_set field in prog).
Item | Description |
---|---|
prog | Returns
which Performance Monitor events and modes are set.
It supports the following modes:
|
prog_mm | Returns which Performance Monitor events and associated modes
are set. It supports the following modes:
The PM_PROCTREE mode and the PM_COUNT mode are common to all mode set. |
Item | Description |
---|---|
0 | No errors occurred. |
Positive error code | Refer to the pm_error (pm_error Subroutine) subroutine to decode the error code. |
Refer to the pm_error Subroutine.
Item | Description |
---|---|
/usr/include/pmapi.h | Defines standard macros, data types, and subroutines. |