PAPI 7.1.0.0
Loading...
Searching...
No Matches
papi_debug.h File Reference
Include dependency graph for papi_debug.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DEBUG_SUBSTRATE   0x002
 
#define DEBUG_API   0x004
 
#define DEBUG_INTERNAL   0x008
 
#define DEBUG_THREADS   0x010
 
#define DEBUG_MULTIPLEX   0x020
 
#define DEBUG_OVERFLOW   0x040
 
#define DEBUG_PROFILE   0x080
 
#define DEBUG_MEMORY   0x100
 
#define DEBUG_LEAK   0x200
 
#define DEBUG_HIGHLEVEL   0x400
 
#define DEBUG_ALL   (DEBUG_SUBSTRATE|DEBUG_API|DEBUG_INTERNAL|DEBUG_THREADS|DEBUG_MULTIPLEX|DEBUG_OVERFLOW|DEBUG_PROFILE|DEBUG_MEMORY|DEBUG_LEAK|DEBUG_HIGHLEVEL)
 
#define FUNC   "?"
 
#define DEBUGLABEL(a)   if (_papi_hwi_thread_id_fn) fprintf(stderr, "%s:%s:%s:%d:%d:%#lx ",a,__FILE__, FUNC, __LINE__,(int)getpid(),_papi_hwi_thread_id_fn()); else fprintf(stderr, "%s:%s:%s:%d:%d ",a,__FILE__, FUNC, __LINE__, (int)getpid())
 
#define ISLEVEL(a)   (_papi_hwi_debug&a)
 
#define DEBUGLEVEL(a)   ((a&DEBUG_SUBSTRATE)?"SUBSTRATE":(a&DEBUG_API)?"API":(a&DEBUG_INTERNAL)?"INTERNAL":(a&DEBUG_THREADS)?"THREADS":(a&DEBUG_MULTIPLEX)?"MULTIPLEX":(a&DEBUG_OVERFLOW)?"OVERFLOW":(a&DEBUG_PROFILE)?"PROFILE":(a&DEBUG_MEMORY)?"MEMORY":(a&DEBUG_LEAK)?"LEAK":(a&DEBUG_HIGHLEVEL)?"HIGHLEVEL":"UNKNOWN")
 
#define PAPIDEBUG(level, format, args...)   { if(_papi_hwi_debug&level){DEBUGLABEL(DEBUGLEVEL(level));fprintf(stderr,format, ## args);}}
 
#define SUBDBG(format, args...)   (PAPIDEBUG(DEBUG_SUBSTRATE,format, ## args))
 
#define APIDBG(format, args...)   (PAPIDEBUG(DEBUG_API,format, ## args))
 
#define INTDBG(format, args...)   (PAPIDEBUG(DEBUG_INTERNAL,format, ## args))
 
#define THRDBG(format, args...)   (PAPIDEBUG(DEBUG_THREADS,format, ## args))
 
#define MPXDBG(format, args...)   (PAPIDEBUG(DEBUG_MULTIPLEX,format, ## args))
 
#define OVFDBG(format, args...)   (PAPIDEBUG(DEBUG_OVERFLOW,format, ## args))
 
#define PRFDBG(format, args...)   (PAPIDEBUG(DEBUG_PROFILE,format, ## args))
 
#define MEMDBG(format, args...)   (PAPIDEBUG(DEBUG_MEMORY,format, ## args))
 
#define LEAKDBG(format, args...)   (PAPIDEBUG(DEBUG_LEAK,format, ## args))
 
#define HLDBG(format, args...)   (PAPIDEBUG(DEBUG_HIGHLEVEL,format, ## args))
 

Variables

int _papi_hwi_debug
 
unsigned long int(* _papi_hwi_thread_id_fn )(void)
 

Detailed Description

Author
Philip Mucci mucci.nosp@m.@cs..nosp@m.utk.e.nosp@m.du
Dan Terpstra terpstra.utk.edu
Kevin London londo.nosp@m.n@cs.nosp@m..utk..nosp@m.edu
Haihang You you@c.nosp@m.s.ut.nosp@m.k.edu

Definition in file papi_debug.h.

Macro Definition Documentation

◆ APIDBG

#define APIDBG (   format,
  args... 
)    (PAPIDEBUG(DEBUG_API,format, ## args))

Definition at line 65 of file papi_debug.h.

◆ DEBUG_ALL

◆ DEBUG_API

#define DEBUG_API   0x004

Definition at line 28 of file papi_debug.h.

◆ DEBUG_HIGHLEVEL

#define DEBUG_HIGHLEVEL   0x400

Definition at line 36 of file papi_debug.h.

◆ DEBUG_INTERNAL

#define DEBUG_INTERNAL   0x008

Definition at line 29 of file papi_debug.h.

◆ DEBUG_LEAK

#define DEBUG_LEAK   0x200

Definition at line 35 of file papi_debug.h.

◆ DEBUG_MEMORY

#define DEBUG_MEMORY   0x100

Definition at line 34 of file papi_debug.h.

◆ DEBUG_MULTIPLEX

#define DEBUG_MULTIPLEX   0x020

Definition at line 31 of file papi_debug.h.

◆ DEBUG_OVERFLOW

#define DEBUG_OVERFLOW   0x040

Definition at line 32 of file papi_debug.h.

◆ DEBUG_PROFILE

#define DEBUG_PROFILE   0x080

Definition at line 33 of file papi_debug.h.

◆ DEBUG_SUBSTRATE

#define DEBUG_SUBSTRATE   0x002

Definition at line 27 of file papi_debug.h.

◆ DEBUG_THREADS

#define DEBUG_THREADS   0x010

Definition at line 30 of file papi_debug.h.

◆ DEBUGLABEL

#define DEBUGLABEL (   a)    if (_papi_hwi_thread_id_fn) fprintf(stderr, "%s:%s:%s:%d:%d:%#lx ",a,__FILE__, FUNC, __LINE__,(int)getpid(),_papi_hwi_thread_id_fn()); else fprintf(stderr, "%s:%s:%s:%d:%d ",a,__FILE__, FUNC, __LINE__, (int)getpid())

Definition at line 54 of file papi_debug.h.

◆ DEBUGLEVEL

#define DEBUGLEVEL (   a)    ((a&DEBUG_SUBSTRATE)?"SUBSTRATE":(a&DEBUG_API)?"API":(a&DEBUG_INTERNAL)?"INTERNAL":(a&DEBUG_THREADS)?"THREADS":(a&DEBUG_MULTIPLEX)?"MULTIPLEX":(a&DEBUG_OVERFLOW)?"OVERFLOW":(a&DEBUG_PROFILE)?"PROFILE":(a&DEBUG_MEMORY)?"MEMORY":(a&DEBUG_LEAK)?"LEAK":(a&DEBUG_HIGHLEVEL)?"HIGHLEVEL":"UNKNOWN")

Definition at line 57 of file papi_debug.h.

◆ FUNC

#define FUNC   "?"

Definition at line 51 of file papi_debug.h.

◆ HLDBG

#define HLDBG (   format,
  args... 
)    (PAPIDEBUG(DEBUG_HIGHLEVEL,format, ## args))

Definition at line 73 of file papi_debug.h.

◆ INTDBG

#define INTDBG (   format,
  args... 
)    (PAPIDEBUG(DEBUG_INTERNAL,format, ## args))

Definition at line 66 of file papi_debug.h.

◆ ISLEVEL

#define ISLEVEL (   a)    (_papi_hwi_debug&a)

Definition at line 55 of file papi_debug.h.

◆ LEAKDBG

#define LEAKDBG (   format,
  args... 
)    (PAPIDEBUG(DEBUG_LEAK,format, ## args))

Definition at line 72 of file papi_debug.h.

◆ MEMDBG

#define MEMDBG (   format,
  args... 
)    (PAPIDEBUG(DEBUG_MEMORY,format, ## args))

Definition at line 71 of file papi_debug.h.

◆ MPXDBG

#define MPXDBG (   format,
  args... 
)    (PAPIDEBUG(DEBUG_MULTIPLEX,format, ## args))

Definition at line 68 of file papi_debug.h.

◆ OVFDBG

#define OVFDBG (   format,
  args... 
)    (PAPIDEBUG(DEBUG_OVERFLOW,format, ## args))

Definition at line 69 of file papi_debug.h.

◆ PAPIDEBUG

#define PAPIDEBUG (   level,
  format,
  args... 
)    { if(_papi_hwi_debug&level){DEBUGLABEL(DEBUGLEVEL(level));fprintf(stderr,format, ## args);}}

Definition at line 60 of file papi_debug.h.

◆ PRFDBG

#define PRFDBG (   format,
  args... 
)    (PAPIDEBUG(DEBUG_PROFILE,format, ## args))

Definition at line 70 of file papi_debug.h.

◆ SUBDBG

#define SUBDBG (   format,
  args... 
)    (PAPIDEBUG(DEBUG_SUBSTRATE,format, ## args))

Definition at line 64 of file papi_debug.h.

◆ THRDBG

#define THRDBG (   format,
  args... 
)    (PAPIDEBUG(DEBUG_THREADS,format, ## args))

Definition at line 67 of file papi_debug.h.

Variable Documentation

◆ _papi_hwi_debug

int _papi_hwi_debug
extern

Definition at line 187 of file linux-pcp.c.

◆ _papi_hwi_thread_id_fn

unsigned long int(* _papi_hwi_thread_id_fn) (void) ( void  )
extern

Definition at line 42 of file threads.c.