Go to the source code of this file.
|
| int | _papi_hwi_stop_timer (int timer, int signal) |
| |
| int | _papi_hwi_start_timer (int timer, int signal, int ms) |
| |
| int | _papi_hwi_stop_signal (int signal) |
| |
| int | _papi_hwi_start_signal (int signal, int need_context, int cidx) |
| |
| int | _papi_hwi_initialize (DynamicArray_t **) |
| |
| int | _papi_hwi_dispatch_overflow_signal (void *papiContext, caddr_t address, int *, long long, int, ThreadInfo_t **master, int cidx) |
| |
| void | _papi_hwi_dispatch_profile (EventSetInfo_t *ESI, caddr_t address, long long over, int profile_index) |
| |
◆ _papi_hwi_dispatch_overflow_signal()
| int _papi_hwi_dispatch_overflow_signal |
( |
void * |
papiContext, |
|
|
caddr_t |
address, |
|
|
int * |
, |
|
|
long long |
, |
|
|
int |
, |
|
|
ThreadInfo_t ** |
master, |
|
|
int |
cidx |
|
) |
| |
Definition at line 216 of file extras.c.
221 int retval, event_counter,
i, overflow_flag, pos;
223 int profile_index = 0;
224 long long overflow_vector;
227 long long latest = 0;
243 OVFDBG(
"Either no eventset or eventset not set to overflow.\n" );
244 #ifdef ANY_THREAD_GETS_SIGNAL 255 (
"eventset->thread %#lx vs. current thread %#lx mismatch",
277 for (
i = 0;
i < event_counter;
i++ ) {
279 latest = ESI->
sw_stop[papi_index];
284 (
"dispatch_overflow() latest %lld, deadline %lld, threshold %d\n",
288 overflow_vector ^= (
long long ) 1 << pos;
296 }
else if ( genOverflowBit ) {
305 overflow_vector = (
long long ) 1 << pos;
307 overflow_vector = overflow_bit;
312 while ( overflow_vector ) {
313 i = ffsll( overflow_vector ) - 1;
314 for ( j = 0; j < event_counter; j++ ) {
320 for ( k = 0, pos = 0; k < PAPI_EVENTS_IN_DERIVED_EVENT && pos >= 0;
329 if ( j == event_counter ) {
331 (
"BUG! overflow_vector is 0, dropping interrupt" );
339 over = temp[profile_index];
342 overflow_vector ^= (
long long ) 1 <<
i;
352 #ifdef ANY_THREAD_GETS_SIGNAL 354 OVFDBG(
"I haven't been noticed by PAPI before\n" );
unsigned long int(* _papi_hwi_thread_id_fn)(void)
EventSetOverflowInfo_t overflow
#define PAPI_OVERFLOW_HARDWARE
struct _ThreadInfo * master
#define OVFDBG(format, args...)
int _papi_hwi_read(hwd_context_t *context, EventSetInfo_t *ESI, long long *values)
hwd_ucontext_t * ucontext
void PAPIERROR(char *format,...)
EventInfo_t * EventInfoArray
int pos[PAPI_EVENTS_IN_DERIVED_EVENT]
int _papi_hwi_broadcast_signal(unsigned int mytid)
inline_static ThreadInfo_t * _papi_hwi_lookup_thread(int custom_tid)
struct papi_vectors * _papi_hwd[]
PAPI_overflow_handler_t handler
◆ _papi_hwi_dispatch_profile()
| void _papi_hwi_dispatch_profile |
( |
EventSetInfo_t * |
ESI, |
|
|
caddr_t |
address, |
|
|
long long |
over, |
|
|
int |
profile_index |
|
) |
| |
Definition at line 165 of file extras.c.
176 PRFDBG(
"handled IP %p\n", pc );
178 sprof = profile->
prof[profile_index];
189 if ( best_index == -1 )
#define PRFDBG(format, args...)
EventSetProfileInfo_t profile
◆ _papi_hwi_initialize()
◆ _papi_hwi_start_signal()
| int _papi_hwi_start_signal |
( |
int |
signal, |
|
|
int |
need_context, |
|
|
int |
cidx |
|
) |
| |
Definition at line 403 of file extras.c.
410 INTDBG(
"_papi_hwi_using_signal is now %d\n",
417 action.sa_flags = SA_RESTART;
423 action.sa_flags |= SIGPWR;
425 action.sa_flags |= SA_SIGINFO;
428 INTDBG(
"installing signal handler\n" );
435 INTDBG(
"_papi_hwi_using_signal[%d] is now %d.\n",
signal,
#define INTDBG(format, args...)
inline_static int _papi_hwi_lock(int lck)
static void action(void *arg, int regno, const char *name, uint8_t bits)
inline_static int _papi_hwi_unlock(int lck)
void PAPIERROR(char *format,...)
int sigaction(int __sig, const struct sigaction *__restrict __act, struct sigaction *__restrict __oact) __attribute__((__nothrow__
__sighandler_t signal(int __sig, __sighandler_t __handler) __attribute__((__nothrow__
struct papi_vectors * _papi_hwd[]
◆ _papi_hwi_start_timer()
| int _papi_hwi_start_timer |
( |
int |
timer, |
|
|
int |
signal, |
|
|
int |
ms |
|
) |
| |
Definition at line 368 of file extras.c.
370 struct itimerval value;
376 #ifdef ANY_THREAD_GETS_SIGNAL 379 INTDBG(
"itimer already installed\n" );
388 value.it_interval.tv_sec = 0;
389 value.it_interval.tv_usec = us;
390 value.it_value.tv_sec = 0;
391 value.it_value.tv_usec = us;
393 INTDBG(
"Installing itimer %d, with %d us interval\n", timer, us );
394 if ( setitimer( timer, &value, NULL ) < 0 ) {
#define INTDBG(format, args...)
inline_static int _papi_hwi_lock(int lck)
inline_static int _papi_hwi_unlock(int lck)
void PAPIERROR(char *format,...)
__sighandler_t signal(int __sig, __sighandler_t __handler) __attribute__((__nothrow__
◆ _papi_hwi_stop_signal()
| int _papi_hwi_stop_signal |
( |
int |
signal | ) |
|
Definition at line 443 of file extras.c.
447 INTDBG(
"removing signal handler\n" );
455 INTDBG(
"_papi_hwi_using_signal[%d] is now %d\n",
signal,
#define INTDBG(format, args...)
inline_static int _papi_hwi_lock(int lck)
inline_static int _papi_hwi_unlock(int lck)
void PAPIERROR(char *format,...)
int sigaction(int __sig, const struct sigaction *__restrict __act, struct sigaction *__restrict __oact) __attribute__((__nothrow__
__sighandler_t signal(int __sig, __sighandler_t __handler) __attribute__((__nothrow__
◆ _papi_hwi_stop_timer()
| int _papi_hwi_stop_timer |
( |
int |
timer, |
|
|
int |
signal |
|
) |
| |
Definition at line 463 of file extras.c.
465 struct itimerval value;
467 #ifdef ANY_THREAD_GETS_SIGNAL 470 INTDBG(
"itimer in use by another thread\n" );
479 value.it_interval.tv_sec = 0;
480 value.it_interval.tv_usec = 0;
481 value.it_value.tv_sec = 0;
482 value.it_value.tv_usec = 0;
484 INTDBG(
"turning off timer\n" );
485 if ( setitimer( timer, &value, NULL ) == -1 ) {
#define INTDBG(format, args...)
inline_static int _papi_hwi_lock(int lck)
inline_static int _papi_hwi_unlock(int lck)
void PAPIERROR(char *format,...)
__sighandler_t signal(int __sig, __sighandler_t __handler) __attribute__((__nothrow__