PAPI 7.1.0.0
Loading...
Searching...
No Matches
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
12long long _solaris_get_real_usec( void );
13long long _solaris_get_real_cycles( void );
14long long _solaris_get_virt_usec( void );
15
16/* Assembler prototypes */
17
18extern void cpu_sync( void );
20
21extern 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
void * vptr_t
Definition: papi.h:576
#define PAPI_MAX_LOCK
Definition: papi_lock.h:18
int _solaris_update_shlib_info(papi_mdi_t *mdi)
long long _solaris_get_real_usec(void)
vptr_t _etext
vptr_t _start
rwlock_t lock[PAPI_MAX_LOCK]
Definition: aix.c:25
vptr_t _end
vptr_t _edata
int _solaris_get_system_info(papi_mdi_t *mdi)
void cpu_sync(void)
long long _solaris_get_virt_usec(void)
long long _solaris_get_real_cycles(void)
unsigned long long get_tick(void)