PAPI 7.1.0.0
Loading...
Searching...
No Matches
aix.h File Reference
Include dependency graph for aix.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ppc64_pmapi_control_t
 
struct  ppc64_reg_alloc_t
 
struct  ppc64_pmapi_context_t
 

Macros

#define ANY_THREAD_GETS_SIGNAL
 
#define POWER_MAX_COUNTERS   MAX_COUNTERS
 
#define MAX_COUNTER_TERMS   MAX_COUNTERS
 
#define MAX_MPX_COUNTERS   32
 
#define INVALID_EVENT   -2
 
#define POWER_MAX_COUNTERS_MAPPING   8
 
#define PMINFO_T   pm_info_t
 
#define PMEVENTS_T   pm_events_t
 
#define PM_INIT_FLAGS   PM_VERIFIED|PM_UNVERIFIED|PM_CAVEAT|PM_GET_GROUPS
 

Typedefs

typedef pm_info_t hwd_pminfo_t
 
typedef pm_events_t hwd_pmevents_t
 
typedef ppc64_pmapi_control_t hwd_control_state_t
 
typedef ppc64_reg_alloc_t hwd_reg_alloc_t
 
typedef ppc64_pmapi_context_t hwd_context_t
 

Functions

int _aix_set_granularity (hwd_control_state_t *this_state, int domain)
 
int _papi_hwd_init_preset_search_map (hwd_pminfo_t *info)
 
int _aix_get_memory_info (PAPI_hw_info_t *mem_info, int type)
 
int _aix_get_dmem_info (PAPI_dmem_info_t *d)
 

Variables

 _text
 
 _etext
 
 _edata
 
 _end
 
 _data
 
pm_groups_info_t pmgroups
 

Macro Definition Documentation

◆ ANY_THREAD_GETS_SIGNAL

#define ANY_THREAD_GETS_SIGNAL

Definition at line 42 of file aix.h.

◆ INVALID_EVENT

#define INVALID_EVENT   -2

Definition at line 46 of file aix.h.

◆ MAX_COUNTER_TERMS

#define MAX_COUNTER_TERMS   MAX_COUNTERS

Definition at line 44 of file aix.h.

◆ MAX_MPX_COUNTERS

#define MAX_MPX_COUNTERS   32

Definition at line 45 of file aix.h.

◆ PM_INIT_FLAGS

#define PM_INIT_FLAGS   PM_VERIFIED|PM_UNVERIFIED|PM_CAVEAT|PM_GET_GROUPS

Definition at line 75 of file aix.h.

◆ PMEVENTS_T

#define PMEVENTS_T   pm_events_t

Definition at line 67 of file aix.h.

◆ PMINFO_T

#define PMINFO_T   pm_info_t

Definition at line 66 of file aix.h.

◆ POWER_MAX_COUNTERS

#define POWER_MAX_COUNTERS   MAX_COUNTERS

Definition at line 43 of file aix.h.

◆ POWER_MAX_COUNTERS_MAPPING

#define POWER_MAX_COUNTERS_MAPPING   8

Definition at line 47 of file aix.h.

Typedef Documentation

◆ hwd_context_t

Definition at line 116 of file aix.h.

◆ hwd_control_state_t

Definition at line 114 of file aix.h.

◆ hwd_pmevents_t

typedef pm_events_t hwd_pmevents_t

Definition at line 82 of file aix.h.

◆ hwd_pminfo_t

typedef pm_info_t hwd_pminfo_t

Definition at line 81 of file aix.h.

◆ hwd_reg_alloc_t

Definition at line 115 of file aix.h.

Function Documentation

◆ _aix_get_dmem_info()

int _aix_get_dmem_info ( PAPI_dmem_info_t d)

Definition at line 64 of file aix-memory.c.

65{
66 /* This function has been reimplemented
67 to conform to current interface.
68 It has not been tested.
69 Nor has it been confirmed for completeness.
70 dkt 05-10-06
71 */
72
73 struct procsinfo pi;
74 pid_t mypid = getpid( );
75 pid_t pid;
76 int found = 0;
77
78 pid = 0;
79 while ( 1 ) {
80 if ( getprocs( &pi, sizeof ( pi ), 0, 0, &pid, 1 ) != 1 )
81 break;
82 if ( mypid == pi.pi_pid ) {
83 found = 1;
84 break;
85 }
86 }
87 if ( !found )
88 return ( PAPI_ESYS );
89
90 d->size = pi.pi_size;
91 d->resident = pi.pi_drss + pi.pi_trss;
94 d->text = pi.pi_trss; /* this is a guess */
96 d->heap = PAPI_EINVAL;
98 d->stack = PAPI_EINVAL;
99 d->pagesize = getpagesize( );
100
101 return ( PAPI_OK );
102}
#define PAPI_OK
Definition: f90papi.h:73
#define PAPI_EINVAL
Definition: f90papi.h:115
#define PAPI_ESYS
Definition: f90papi.h:136
static int pid
long long locked
Definition: papi.h:874
long long shared
Definition: papi.h:870
long long text
Definition: papi.h:871
long long heap
Definition: papi.h:873
long long size
Definition: papi.h:867
long long library
Definition: papi.h:872
long long stack
Definition: papi.h:875
long long pagesize
Definition: papi.h:876
long long high_water_mark
Definition: papi.h:869
long long resident
Definition: papi.h:868

◆ _aix_get_memory_info()

int _aix_get_memory_info ( PAPI_hw_info_t mem_info,
int  type 
)

Definition at line 16 of file aix-memory.c.

17{
18 PAPI_mh_level_t *L = mem_info->mem_hierarchy.level;
19
20 /* Not quite sure what bit 30 indicates.
21 I'm assuming it flags a unified tlb */
22 if ( _system_configuration.tlb_attrib & ( 1 << 30 ) ) {
24 L[0].tlb[0].num_entries = _system_configuration.itlb_size;
26 } else {
27 L[0].tlb[0].type = PAPI_MH_TYPE_INST;
28 L[0].tlb[0].num_entries = _system_configuration.itlb_size;
29 L[0].tlb[0].associativity = _system_configuration.itlb_asc;
30 L[0].tlb[1].type = PAPI_MH_TYPE_DATA;
31 L[0].tlb[1].num_entries = _system_configuration.dtlb_size;
32 L[0].tlb[1].associativity = _system_configuration.dtlb_asc;
33 }
34 /* Not quite sure what bit 30 indicates.
35 I'm assuming it flags a unified cache */
36 if ( _system_configuration.cache_attrib & ( 1 << 30 ) ) {
38 L[0].cache[0].size = _system_configuration.icache_size;
39 L[0].cache[0].associativity = _system_configuration.icache_asc;
40 L[0].cache[0].line_size = _system_configuration.icache_line;
41 } else {
43 L[0].cache[0].size = _system_configuration.icache_size;
44 L[0].cache[0].associativity = _system_configuration.icache_asc;
45 L[0].cache[0].line_size = _system_configuration.icache_line;
47 L[0].cache[1].size = _system_configuration.dcache_size;
48 L[0].cache[1].associativity = _system_configuration.dcache_asc;
49 L[0].cache[1].line_size = _system_configuration.dcache_line;
50 }
52 L[1].cache[0].size = _system_configuration.L2_cache_size;
53 L[1].cache[0].associativity = _system_configuration.L2_cache_asc;
54 /* is there a line size for Level 2 cache? */
55
56 /* it looks like we've always got at least 2 levels of info */
57 /* what about level 3 cache? */
58 mem_info->mem_hierarchy.levels = 2;
59
60 return PAPI_OK;
61}
#define PAPI_MH_TYPE_DATA
Definition: papi.h:720
#define PAPI_MH_TYPE_INST
Definition: papi.h:719
#define PAPI_MH_TYPE_UNIFIED
Definition: papi.h:723
PAPI_mh_info_t mem_hierarchy
Definition: papi.h:793
int levels
Definition: papi.h:768
PAPI_mh_level_t level[PAPI_MAX_MEM_HIERARCHY_LEVELS]
Definition: papi.h:769
PAPI_mh_tlb_info_t tlb[PAPI_MH_MAX_LEVELS]
Definition: papi.h:761
PAPI_mh_cache_info_t cache[PAPI_MH_MAX_LEVELS]
Definition: papi.h:762
int associativity
Definition: papi.h:747

◆ _aix_set_granularity()

int _aix_set_granularity ( hwd_control_state_t this_state,
int  domain 
)

Definition at line 486 of file aix.c.

487{
488 pm_mode_t *mode = &( this_state->counter_cmd.mode );
489
490 switch ( domain ) {
491 case PAPI_GRN_THR:
492 mode->b.process = 0;
493 mode->b.proctree = 0;
494 break;
495 /* case PAPI_GRN_PROC:
496 mode->b.process = 1;
497 mode->b.proctree = 0;
498 break;
499 case PAPI_GRN_PROCG:
500 mode->b.process = 0;
501 mode->b.proctree = 1;
502 break; */
503 default:
504 return ( PAPI_EINVAL );
505 }
506 return ( PAPI_OK );
507}
#define PAPI_GRN_THR
Definition: f90papi.h:265
papi_cpc_event_t counter_cmd
Definition: solaris-ultra.h:61
Here is the caller graph for this function:

◆ _papi_hwd_init_preset_search_map()

int _papi_hwd_init_preset_search_map ( hwd_pminfo_t info)

Variable Documentation

◆ _data

_data
extern

◆ _edata

_edata
extern

Definition at line 19 of file solaris-common.h.

◆ _end

_end
extern

Definition at line 19 of file solaris-common.h.

◆ _etext

_etext
extern

Definition at line 19 of file solaris-common.h.

◆ _text

_text
extern

◆ pmgroups

pm_groups_info_t pmgroups
extern

Definition at line 44 of file aix.c.