PAPI  5.3.2.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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_ALL   (DEBUG_SUBSTRATE|DEBUG_API|DEBUG_INTERNAL|DEBUG_THREADS|DEBUG_MULTIPLEX|DEBUG_OVERFLOW|DEBUG_PROFILE|DEBUG_MEMORY|DEBUG_LEAK)
 
#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":"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))
 

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

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

Definition at line 64 of file papi_debug.h.

#define DEBUG_API   0x004

Definition at line 28 of file papi_debug.h.

#define DEBUG_INTERNAL   0x008

Definition at line 29 of file papi_debug.h.

#define DEBUG_LEAK   0x200

Definition at line 35 of file papi_debug.h.

#define DEBUG_MEMORY   0x100

Definition at line 34 of file papi_debug.h.

#define DEBUG_MULTIPLEX   0x020

Definition at line 31 of file papi_debug.h.

#define DEBUG_OVERFLOW   0x040

Definition at line 32 of file papi_debug.h.

#define DEBUG_PROFILE   0x080

Definition at line 33 of file papi_debug.h.

#define DEBUG_SUBSTRATE   0x002

Definition at line 27 of file papi_debug.h.

#define DEBUG_THREADS   0x010

Definition at line 30 of file papi_debug.h.

#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 53 of file papi_debug.h.

#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":"UNKNOWN")

Definition at line 56 of file papi_debug.h.

#define FUNC   "?"

Definition at line 50 of file papi_debug.h.

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

Definition at line 65 of file papi_debug.h.

#define ISLEVEL (   a)    (_papi_hwi_debug&a)

Definition at line 54 of file papi_debug.h.

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

Definition at line 71 of file papi_debug.h.

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

Definition at line 70 of file papi_debug.h.

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

Definition at line 67 of file papi_debug.h.

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

Definition at line 68 of file papi_debug.h.

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

Definition at line 59 of file papi_debug.h.

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

Definition at line 69 of file papi_debug.h.

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

Definition at line 63 of file papi_debug.h.

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

Definition at line 66 of file papi_debug.h.

Variable Documentation

int _papi_hwi_debug

Definition at line 74 of file papi.c.

unsigned long int( * _papi_hwi_thread_id_fn)(void)

Definition at line 42 of file threads.c.