Retrieves Performance Monitor settings in counter multiplexing mode and multi-mode for the counting group to which a target pthread belongs.
Performance Monitor APIs Library (libpmapi.a)
The pm_get_program_pgroup_mx and the pm_get_program_pgroup_mm subroutine retrieve the Performance Monitor settings for the counting group to which a target pthread belongs. The pthread must be stopped and must be part of a debuggee process, which is under the control of the calling process. This includes mode information and the events being counted, which are in an array of lists of event identifiers. The event identifiers come from the lists returned by the pm_inititialize subroutine.
If the pthread is running in 1:1 mode, only the tid parameter must be specified. If the pthread is running in m:n mode, only the ptid parameter must be specified. If both the ptid and tid parameters are specified, they must be referring to a single pthread with the ptid parameter specified and currently running on a kernel thread with the tid parameter specified.
When counting in multiplexing mode, the mode is global to all of the events lists. When counting in the multi-mode, a mode is associated with each event list.
The counting mode includes the user mode and kernel mode, and the current counting state.
If the list includes an event that can be used with a threshold (as indicated by the pm_initialize subroutine), a threshold value is also returned.
The user application must free the allocated array to store the event lists (the events_set field in the prog parameter).
Item | Description |
---|---|
pid | Process ID of target pthread. The target process must be an argument of a debug process. |
tid | Thread ID of target pthread. To ignore this parameter, set it to 0. |
ptid | Pthread ID of the target pthread. To ignore this parameter, set it to 0. |
*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 modes set. |
Item | Description |
---|---|
0 | No errors occurred. |
Positive error code | See the pm_error Subroutine to decode the error code. |
See the pm_error Subroutine.
Item | Description |
---|---|
/usr/include/pmapi.h | Defines standard macros, data types, and subroutines. |