PAPI 7.1.0.0
Loading...
Searching...
No Matches
solaris-ultra.h
Go to the documentation of this file.
1#ifndef _PAPI_SOLARIS_ULTRA_H
2#define _PAPI_SOLARIS_ULTRA_H
3
4#include <stdio.h>
5#include <stdlib.h>
6#include <fcntl.h>
7#include <unistd.h>
8#include <assert.h>
9#include <string.h>
10#include <libgen.h>
11#include <limits.h>
12#include <synch.h>
13#include <procfs.h>
14#include <libcpc.h>
15#include <libgen.h>
16#include <ctype.h>
17#include <errno.h>
18#include <sys/times.h>
19#include <sys/time.h>
20#include <sys/types.h>
21#include <sys/processor.h>
22#include <sys/procset.h>
23#include <syms.h>
24#include <dlfcn.h>
25#include <sys/stat.h>
26
27#include "papi_defines.h"
28
29#define MAX_COUNTERS 2
30#define MAX_COUNTER_TERMS MAX_COUNTERS
31#define PAPI_MAX_NATIVE_EVENTS 71
32#define MAX_NATIVE_EVENT PAPI_MAX_NATIVE_EVENTS
33#define MAX_NATIVE_EVENT_USII 22
34
35/* Defines in papi_internal.h cause compile warnings on solaris because typedefs are done here */
36#undef hwd_context_t
37#undef hwd_control_state_t
38#undef hwd_reg_alloc_t
39#undef hwd_register_t
40#undef hwd_siginfo_t
41#undef hwd_ucontext_t
42
43typedef int hwd_reg_alloc_t;
44
45typedef struct US_register
46{
47 int event[MAX_COUNTERS];
49
50typedef struct papi_cpc_event
51{
52 /* Structure to libcpc */
53 cpc_event_t cmd;
54 /* Flags to kernel */
55 int flags;
57
58typedef struct hwd_control_state
59{
60 /* Buffer to pass to the kernel to control the counters */
62 /* overflow event counter */
65
67
68typedef struct _native_info
69{
70 /* native name */
71 char name[40];
72 /* Buffer to pass to the kernel to control the counters */
73 int encoding[MAX_COUNTERS];
75
76#include "solaris-context.h"
77
78typedef int hwd_context_t;
79
80/* Assembler prototypes */
81
82extern void cpu_sync( void );
83extern unsigned long long get_tick( void );
85
86extern rwlock_t lock[PAPI_MAX_LOCK];
87
88#define _papi_hwd_lock(lck) rw_wrlock(&lock[lck]);
89
90#define _papi_hwd_unlock(lck) rw_unlock(&lock[lck]);
91
92#endif
void * vptr_t
Definition: papi.h:576
#define PAPI_MAX_LOCK
Definition: papi_lock.h:18
#define MAX_COUNTERS
Definition: perfctr-x86.h:8
const char * name
Definition: rocs.c:225
vptr_t _etext
Definition: solaris-ultra.h:84
vptr_t _start
rwlock_t lock[PAPI_MAX_LOCK]
Definition: aix.c:25
vptr_t _end
Definition: solaris-ultra.h:84
vptr_t _edata
Definition: solaris-ultra.h:84
int hwd_register_map_t
Definition: solaris-ultra.h:66
int hwd_reg_alloc_t
Definition: solaris-ultra.h:43
int hwd_context_t
Definition: solaris-ultra.h:78
void cpu_sync(void)
unsigned long long get_tick(void)
papi_cpc_event_t counter_cmd
Definition: solaris-ultra.h:61
cpc_event_t cmd
Definition: solaris-ultra.h:53