HPCToolkit
diagnostics.h File Reference
#include <stdlib.h>
#include <stdio.h>
Include dependency graph for diagnostics.h:

Go to the source code of this file.

Macros

#define DIAG_EXTERN   extern
 
#define DIAG_DBG_LVL   0
 
#define DIAG_If(level)   if (level <= DIAG_DBG_LVL_PUB)
 
#define DIAG_DevIf(level)   if (level <= DIAG_DBG_LVL)
 
#define DIAG_MsgIf(ifexpr, ...)
 
#define DIAG_Msg(level, ...)
 
#define DIAG_DevMsg(level, ...)
 
#define DIAG_EMsg(...)
 
#define DIAG_DevEMsg(...)
 
#define DIAG_Die(...)
 

Functions

DIAG_EXTERN void Diagnostics_SetDiagnosticFilterLevel (int lvl)
 
DIAG_EXTERN int Diagnostics_GetDiagnosticFilterLevel ()
 
DIAG_EXTERN void Diagnostics_TheMostVisitedBreakpointInHistory (const char *filenm, unsigned int lineno)
 

Variables

int DIAG_DBG_LVL_PUB
 
const char * DIAG_Unimplemented
 
const char * DIAG_UnexpectedInput
 
const char * DIAG_UnexpectedOpr
 

Macro Definition Documentation

◆ DIAG_DBG_LVL

#define DIAG_DBG_LVL   0

Definition at line 88 of file diagnostics.h.

◆ DIAG_DevEMsg

#define DIAG_DevEMsg (   ...)
Value:
{ fputs("ERROR: ", stdout); \
fprintf(stdout, __VA_ARGS__); fputs("\n", stdout); \
fprintf(stdout, "\t[%s:%d]\n", __FILE__, __LINE__); } \
}
int DIAG_DBG_LVL_PUB
Definition: diagnostics.cpp:77

Definition at line 256 of file diagnostics.h.

◆ DIAG_DevIf

#define DIAG_DevIf (   level)    if (level <= DIAG_DBG_LVL)

Definition at line 137 of file diagnostics.h.

◆ DIAG_DevMsg

#define DIAG_DevMsg (   level,
  ... 
)
Value:
if (level <= DIAG_DBG_LVL) { \
fprintf(stdout, "msg* [%d]: ", level); \
fprintf(stdout, __VA_ARGS__); fputs("\n", stdout); }
#define DIAG_DBG_LVL
Definition: diagnostics.h:88

Definition at line 246 of file diagnostics.h.

◆ DIAG_Die

#define DIAG_Die (   ...)
Value:
DIAG_EMsg(__VA_ARGS__); \
#define DIAG_EMsg(...)
Definition: diagnostics.h:251
DIAG_EXTERN void Diagnostics_TheMostVisitedBreakpointInHistory(const char *filenm, unsigned int lineno)
exit
Definition: names.cpp:1

Definition at line 267 of file diagnostics.h.

◆ DIAG_EMsg

#define DIAG_EMsg (   ...)
Value:
{ fputs("ERROR: ", stdout); \
fprintf(stdout, __VA_ARGS__); fputs("\n", stdout); \
}

Definition at line 251 of file diagnostics.h.

◆ DIAG_EXTERN

#define DIAG_EXTERN   extern

Definition at line 81 of file diagnostics.h.

◆ DIAG_If

#define DIAG_If (   level)    if (level <= DIAG_DBG_LVL_PUB)

Definition at line 134 of file diagnostics.h.

◆ DIAG_Msg

#define DIAG_Msg (   level,
  ... 
)
Value:
if (level <= DIAG_DBG_LVL_PUB) { \
fprintf(stdout, "msg [%d]: ", level); \
fprintf(stdout, __VA_ARGS__); fputs("\n", stdout); }
int DIAG_DBG_LVL_PUB
Definition: diagnostics.cpp:77

Definition at line 241 of file diagnostics.h.

◆ DIAG_MsgIf

#define DIAG_MsgIf (   ifexpr,
  ... 
)
Value:
if (ifexpr) { \
fputs("msg: ", stdout); \
fprintf(stdout, __VA_ARGS__); fputs("\n", stdout); }

Definition at line 236 of file diagnostics.h.

Function Documentation

◆ Diagnostics_GetDiagnosticFilterLevel()

DIAG_EXTERN int Diagnostics_GetDiagnosticFilterLevel ( )

Definition at line 87 of file diagnostics.cpp.

Here is the caller graph for this function:

◆ Diagnostics_SetDiagnosticFilterLevel()

DIAG_EXTERN void Diagnostics_SetDiagnosticFilterLevel ( int  lvl)

Definition at line 80 of file diagnostics.cpp.

Here is the caller graph for this function:

◆ Diagnostics_TheMostVisitedBreakpointInHistory()

DIAG_EXTERN void Diagnostics_TheMostVisitedBreakpointInHistory ( const char *  filenm,
unsigned int  lineno 
)

Variable Documentation

◆ DIAG_DBG_LVL_PUB

int DIAG_DBG_LVL_PUB

Definition at line 77 of file diagnostics.cpp.

◆ DIAG_UnexpectedInput

const char* DIAG_UnexpectedInput

Definition at line 105 of file diagnostics.cpp.

◆ DIAG_UnexpectedOpr

const char* DIAG_UnexpectedOpr

Definition at line 107 of file diagnostics.cpp.

◆ DIAG_Unimplemented

const char* DIAG_Unimplemented

Definition at line 103 of file diagnostics.cpp.