Blame src/solaris-common.h

Packit 577717
#ifndef _PAPI_SOLARIS_H
Packit 577717
#define _PAPI_SOLARIS_H
Packit 577717
Packit 577717
#include <synch.h>
Packit 577717
#include <procfs.h>
Packit 577717
#include <libcpc.h>
Packit 577717
#include <sys/procset.h>
Packit 577717
#include <syms.h>
Packit 577717
Packit 577717
int _solaris_update_shlib_info( papi_mdi_t *mdi );
Packit 577717
int _solaris_get_system_info( papi_mdi_t *mdi );
Packit 577717
long long _solaris_get_real_usec( void );
Packit 577717
long long _solaris_get_real_cycles( void );
Packit 577717
long long _solaris_get_virt_usec( void );
Packit 577717
Packit 577717
/* Assembler prototypes */
Packit 577717
Packit 577717
extern void cpu_sync( void );
Packit 577717
extern caddr_t _start, _end, _etext, _edata;
Packit 577717
Packit 577717
extern rwlock_t lock[PAPI_MAX_LOCK];
Packit 577717
Packit 577717
#define _papi_hwd_lock(lck) rw_wrlock(&lock[lck]);
Packit 577717
Packit 577717
#define _papi_hwd_unlock(lck)   rw_unlock(&lock[lck]);
Packit 577717
Packit 577717
#endif
Packit 577717
Packit 577717
#if 0
Packit 577717
Packit 577717
#include <sys/asm_linkage.h>
Packit 577717
	! #include "solaris-ultra.h"
Packit 577717
Packit 577717
	! These functions blatantly stolen from perfmon
Packit 577717
	! The author of the package "perfmon" is Richard J. Enbody
Packit 577717
	! and the home page for "perfmon" is
Packit 577717
	! http://www.cps.msu.edu/~enbody/perfmon/index.html
Packit 577717
Packit 577717
	!
Packit 577717
	! extern void cpu_sync(void);
Packit 577717
	!
Packit 577717
	! Make sure all instructinos and memory references before us
Packit 577717
	! have been completed.
Packit 577717
	.global cpu_sync
Packit 577717
	ENTRY(cpu_sync)
Packit 577717
	membar	#Sync		! Wait for all outstanding things to finish
Packit 577717
	retl			! Return to the caller
Packit 577717
	  nop			! Delay slot
Packit 577717
	SET_SIZE(cpu_sync)
Packit 577717
Packit 577717
	!
Packit 577717
	! extern unsigned long long get_tick(void)
Packit 577717
	!
Packit 577717
	! Read the tick register and return it
Packit 577717
	.global get_tick
Packit 577717
	ENTRY(get_tick)
Packit 577717
	rd	%tick, %o0	! Get the current value of TICK
Packit 577717
	clruw   %o0, %o1	! put the lower 32 bits into %o1
Packit 577717
	retl			! Return to the caller
Packit 577717
	  srlx  %o0, 32, %o0    ! put the upper 32 bits into %o0
Packit 577717
	SET_SIZE(get_tick)
Packit 577717
Packit 577717
#endif
Packit 577717
Packit 577717
Packit 577717
Packit 577717
Packit 577717