PAPI
7.1.0.0
Loading...
Searching...
No Matches
aix.h
Go to the documentation of this file.
1
#ifndef _PAPI_AIX_H
/* _PAPI_AIX */
2
#define _PAPI_AIX_H
3
4
/****************************/
5
/* THIS IS OPEN SOURCE CODE */
6
/****************************/
7
8
/*
9
* File: pmapi-ppc64.h
10
* Author: Maynard Johnson
11
* maynardj@us.ibm.com
12
* Mods: <your name here>
13
* <your email address>
14
*/
15
16
17
18
#include <stdlib.h>
19
#include <stdio.h>
20
#include <stdarg.h>
21
#include <unistd.h>
22
#include <assert.h>
23
#include <string.h>
24
#include <libgen.h>
25
#include <time.h>
26
#if defined( _AIXVERSION_510) || defined(_AIXVERSION_520)
27
#include <sys/procfs.h>
28
#include <sys/cred.h>
29
#endif
30
#include <procinfo.h>
31
#include <dlfcn.h>
32
#include <sys/time.h>
33
#include <sys/times.h>
34
#include <sys/systemcfg.h>
35
#include <sys/processor.h>
36
#include <sys/atomic_op.h>
37
#include <sys/utsname.h>
38
39
40
#include "pmapi.h"
41
42
#define ANY_THREAD_GETS_SIGNAL
43
#define POWER_MAX_COUNTERS MAX_COUNTERS
44
#define MAX_COUNTER_TERMS MAX_COUNTERS
45
#define MAX_MPX_COUNTERS 32
46
#define INVALID_EVENT -2
47
#define POWER_MAX_COUNTERS_MAPPING 8
48
49
extern
_text
;
50
extern
_etext
;
51
extern
_edata
;
52
extern
_end
;
53
extern
_data
;
54
55
/* globals */
56
#ifdef PM_INITIALIZE
57
#ifdef _AIXVERSION_510
58
#define PMINFO_T pm_info2_t
59
#define PMEVENTS_T pm_events2_t
60
#else
61
#define PMINFO_T pm_info_t
62
#define PMEVENTS_T pm_events_t
63
#endif
64
PMINFO_T
pminfo
;
65
#else
66
#define PMINFO_T pm_info_t
67
#define PMEVENTS_T pm_events_t
68
/*pm_info_t pminfo;*/
69
#endif
70
71
#include "
aix-context.h
"
72
73
/* define the vector structure at the bottom of this file */
74
75
#define PM_INIT_FLAGS PM_VERIFIED|PM_UNVERIFIED|PM_CAVEAT|PM_GET_GROUPS
76
77
#ifdef PM_INITIALIZE
78
typedef
pm_info2_t
hwd_pminfo_t
;
79
typedef
pm_events2_t
hwd_pmevents_t
;
80
#else
81
typedef
pm_info_t
hwd_pminfo_t
;
82
typedef
pm_events_t
hwd_pmevents_t
;
83
#endif
84
85
#include "
ppc64_events.h
"
86
87
typedef
struct
ppc64_pmapi_control
88
{
89
/* Buffer to pass to the kernel to control the counters */
90
pm_prog_t
counter_cmd
;
91
int
group_id
;
92
/* Space to read the counters */
93
pm_data_t
state
;
94
}
ppc64_pmapi_control_t
;
95
96
typedef
struct
ppc64_reg_alloc
97
{
98
int
ra_position
;
99
unsigned
int
ra_group[
GROUP_INTS
];
100
int
ra_counter_cmd[
MAX_COUNTERS
];
101
}
ppc64_reg_alloc_t
;
102
103
typedef
struct
ppc64_pmapi_context
104
{
105
/* this structure is a work in progress */
106
ppc64_pmapi_control_t
cntrl
;
107
}
ppc64_pmapi_context_t
;
108
109
/* Override void* definitions from PAPI framework layer */
110
/* typedefs to conform to hardware independent PAPI code. */
111
#undef hwd_control_state_t
112
#undef hwd_reg_alloc_t
113
#undef hwd_context_t
114
typedef
ppc64_pmapi_control_t
hwd_control_state_t
;
115
typedef
ppc64_reg_alloc_t
hwd_reg_alloc_t
;
116
typedef
ppc64_pmapi_context_t
hwd_context_t
;
117
118
/*
119
typedef struct hwd_groups {
120
// group number from the pmapi pm_groups_t struct
121
//int group_id;
122
// Buffer containing counter cmds for this group
123
unsigned char counter_cmd[POWER_MAX_COUNTERS];
124
} hwd_groups_t;
125
*/
126
127
/* prototypes */
128
extern
int
_aix_set_granularity
(
hwd_control_state_t
* this_state,
int
domain );
129
extern
int
_papi_hwd_init_preset_search_map
(
hwd_pminfo_t
* info );
130
131
extern
int
_aix_get_memory_info
(
PAPI_hw_info_t
* mem_info,
int
type
);
132
extern
int
_aix_get_dmem_info
(
PAPI_dmem_info_t
* d );
133
134
/* Machine dependent info structure */
135
extern
pm_groups_info_t
pmgroups
;
136
137
#endif
/* _PAPI_AIX */
138
aix-context.h
pminfo
hwd_pminfo_t pminfo
Definition:
aix.c:43
hwd_pmevents_t
pm_events_t hwd_pmevents_t
Definition:
aix.h:82
pmgroups
pm_groups_info_t pmgroups
Definition:
aix.c:44
hwd_pminfo_t
pm_info_t hwd_pminfo_t
Definition:
aix.h:81
PMINFO_T
#define PMINFO_T
Definition:
aix.h:66
_aix_get_memory_info
int _aix_get_memory_info(PAPI_hw_info_t *mem_info, int type)
Definition:
aix-memory.c:16
_edata
_edata
Definition:
solaris-common.h:19
_aix_set_granularity
int _aix_set_granularity(hwd_control_state_t *this_state, int domain)
Definition:
aix.c:486
_aix_get_dmem_info
int _aix_get_dmem_info(PAPI_dmem_info_t *d)
Definition:
aix-memory.c:64
_papi_hwd_init_preset_search_map
int _papi_hwd_init_preset_search_map(hwd_pminfo_t *info)
hwd_control_state_t
ppc64_pmapi_control_t hwd_control_state_t
Definition:
aix.h:114
_etext
_etext
Definition:
solaris-common.h:19
_text
_text
_end
_end
Definition:
solaris-common.h:19
hwd_reg_alloc_t
ppc64_reg_alloc_t hwd_reg_alloc_t
Definition:
aix.h:115
hwd_context_t
ppc64_pmapi_context_t hwd_context_t
Definition:
aix.h:116
_data
_data
GROUP_INTS
#define GROUP_INTS
Definition:
components/perfctr_ppc/power5+_events.h:24
type
uint16_t type
Definition:
linux-sensors-ppc.h:5
MAX_COUNTERS
#define MAX_COUNTERS
Definition:
perfctr-x86.h:8
ppc64_events.h
PAPI_dmem_info_t
A pointer to the following is passed to PAPI_get_dmem_info()
Definition:
papi.h:865
PAPI_hw_info_t
Hardware info structure.
Definition:
papi.h:774
hwd_control_state_t
Definition:
freebsd.h:53
ppc64_pmapi_context_t
Definition:
aix.h:104
ppc64_pmapi_context_t::cntrl
ppc64_pmapi_control_t cntrl
Definition:
aix.h:106
ppc64_pmapi_control_t
Definition:
aix.h:88
ppc64_pmapi_control_t::state
pm_data_t state
Definition:
aix.h:93
ppc64_pmapi_control_t::counter_cmd
pm_prog_t counter_cmd
Definition:
aix.h:90
ppc64_pmapi_control_t::group_id
int group_id
Definition:
aix.h:91
ppc64_reg_alloc_t
Definition:
aix.h:97
ppc64_reg_alloc_t::ra_position
int ra_position
Definition:
aix.h:98
src
aix.h
Generated on Wed Dec 20 2023 18:12:50 for PAPI by
1.9.6