PAPI  5.3.2.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
solaris-common.h
Go to the documentation of this file.
1 #ifndef _PAPI_SOLARIS_H
2 #define _PAPI_SOLARIS_H
3 
4 #include <synch.h>
5 #include <procfs.h>
6 #include <libcpc.h>
7 #include <sys/procset.h>
8 #include <syms.h>
9 
12 long long _solaris_get_real_usec( void );
13 long long _solaris_get_real_cycles( void );
14 long long _solaris_get_virt_usec( void );
15 
16 /* Assembler prototypes */
17 
18 extern void cpu_sync( void );
19 extern caddr_t _start, _end, _etext, _edata;
20 
21 extern rwlock_t lock[PAPI_MAX_LOCK];
22 
23 #define _papi_hwd_lock(lck) rw_wrlock(&lock[lck]);
24 
25 #define _papi_hwd_unlock(lck) rw_unlock(&lock[lck]);
26 
27 #endif
28 
29 #if 0
30 
31 #include <sys/asm_linkage.h>
32  ! #include "solaris-ultra.h"
33 
34  ! These functions blatantly stolen from perfmon
35  ! The author of the package "perfmon" is Richard J. Enbody
36  ! and the home page for "perfmon" is
37  ! http://www.cps.msu.edu/~enbody/perfmon/index.html
38 
39  !
40  ! extern void cpu_sync(void);
41  !
42  ! Make sure all instructinos and memory references before us
43  ! have been completed.
44  .global cpu_sync
45  ENTRY(cpu_sync)
46  membar #Sync ! Wait for all outstanding things to finish
47  retl ! Return to the caller
48  nop ! Delay slot
49  SET_SIZE(cpu_sync)
50 
51  !
52  ! extern unsigned long long get_tick(void)
53  !
54  ! Read the tick register and return it
55  .global get_tick
56  ENTRY(get_tick)
57  rd %tick, %o0 ! Get the current value of TICK
58  clruw %o0, %o1 ! put the lower 32 bits into %o1
59  retl ! Return to the caller
60  srlx %o0, 32, %o0 ! put the upper 32 bits into %o0
61  SET_SIZE(get_tick)
62 
63 #endif
64 
65 
66 
67 
68 
int _solaris_update_shlib_info(papi_mdi_t *mdi)
_etext
long long _solaris_get_virt_usec(void)
long long _solaris_get_real_cycles(void)
off64_t current
Definition: iozone.c:19505
unsigned long long get_tick(void)
void double value
Definition: iozone.c:18781
int things
Definition: iozone.c:19922
_end
#define PAPI_MAX_LOCK
Definition: papi_lock.h:18
int lower
Definition: fileop.c:139
int upper
Definition: fileop.c:139
long long _solaris_get_real_usec(void)
_edata
void cpu_sync(void)
caddr_t _start
atomic_p lock[]
Definition: aix.c:25
int _solaris_get_system_info(papi_mdi_t *mdi)