HPCToolkit
messages.h File Reference
#include <stdarg.h>
#include <stdbool.h>
#include <messages/debug-flag.h>
#include <messages/fmt.h>
Include dependency graph for messages.h:

Go to the source code of this file.

Macros

#define EMSG   hpcrun_emsg
 
#define AMSG   hpcrun_amsg
 
#define CTMSG(...)
 
#define STDERR_MSG(...)   hpcrun_stderr_log_msg(false,__VA_ARGS__)
 
#define EEMSG(...)   hpcrun_stderr_log_msg(true,__VA_ARGS__)
 
#define PMSG(f, ...)   hpcrun_pmsg(DBG_PREFIX(f), NULL, __VA_ARGS__)
 
#define TMSG(f, ...)   if (debug_flag_get(DBG_PREFIX(f))) hpcrun_pmsg(#f, __VA_ARGS__)
 
#define ETMSG(f, ...)   hpcrun_pmsg_stderr(true,DBG_PREFIX(f), #f, __VA_ARGS__)
 
#define NMSG(f, ...)   if (debug_flag_get(DBG_PREFIX(f))) hpcrun_nmsg(DBG_PREFIX(f), #f, __VA_ARGS__)
 
#define ENMSG(f, ...)   hpcrun_nmsg_stderr(true, DBG_PREFIX(f), #f, __VA_ARGS__)
 
#define EXIT_ON_ERROR(r, e, ...)   hpcrun_exit_on_error(r,e,__VA_ARGS__)
 
#define hpcrun_abort(...)   hpcrun_abort_w_info(messages_donothing, __VA_ARGS__)
 

Functions

void messages_init ()
 
void messages_fini (void)
 
void messages_logfile_create ()
 
int messages_logfile_fd (void)
 
void messages_donothing (void)
 
void hpcrun_amsg (const char *fmt,...)
 
void hpcrun_emsg (const char *fmt,...)
 
void hpcrun_emsg_valist (const char *fmt, va_list_box *box)
 
void hpcrun_nmsg (pmsg_category flag, const char *tag, const char *fmt,...)
 
void hpcrun_pmsg (const char *tag, const char *fmt,...)
 
void hpcrun_pmsg_stderr (bool echo_stderr, pmsg_category flag, const char *tag, const char *fmt,...)
 
void hpcrun_nmsg_stderr (bool echo_stderr, pmsg_category flag, const char *tag, const char *fmt,...)
 
void hpcrun_stderr_log_msg (bool copy_to_log, const char *fmt,...)
 
void hpcrun_exit_on_error (int ret, int ret_expected, const char *fmt,...)
 
void hpcrun_abort_w_info (void(*info)(void), const char *fmt,...)
 
int hpcrun_below_pmsg_threshold (void)
 
void hpcrun_up_pmsg_count (void)
 
void unlimit_msgs (void)
 
void limit_msgs (void)
 

Macro Definition Documentation

◆ AMSG

#define AMSG   hpcrun_amsg

Definition at line 71 of file messages.h.

◆ CTMSG

#define CTMSG (   ...)

Definition at line 76 of file messages.h.

◆ EEMSG

#define EEMSG (   ...)    hpcrun_stderr_log_msg(true,__VA_ARGS__)

Definition at line 90 of file messages.h.

◆ EMSG

#define EMSG   hpcrun_emsg

Definition at line 70 of file messages.h.

◆ ENMSG

#define ENMSG (   f,
  ... 
)    hpcrun_nmsg_stderr(true, DBG_PREFIX(f), #f, __VA_ARGS__)

Definition at line 97 of file messages.h.

◆ ETMSG

#define ETMSG (   f,
  ... 
)    hpcrun_pmsg_stderr(true,DBG_PREFIX(f), #f, __VA_ARGS__)

Definition at line 95 of file messages.h.

◆ EXIT_ON_ERROR

#define EXIT_ON_ERROR (   r,
  e,
  ... 
)    hpcrun_exit_on_error(r,e,__VA_ARGS__)

Definition at line 100 of file messages.h.

◆ hpcrun_abort

#define hpcrun_abort (   ...)    hpcrun_abort_w_info(messages_donothing, __VA_ARGS__)

Definition at line 102 of file messages.h.

◆ NMSG

#define NMSG (   f,
  ... 
)    if (debug_flag_get(DBG_PREFIX(f))) hpcrun_nmsg(DBG_PREFIX(f), #f, __VA_ARGS__)

Definition at line 96 of file messages.h.

◆ PMSG

#define PMSG (   f,
  ... 
)    hpcrun_pmsg(DBG_PREFIX(f), NULL, __VA_ARGS__)

Definition at line 92 of file messages.h.

◆ STDERR_MSG

#define STDERR_MSG (   ...)    hpcrun_stderr_log_msg(false,__VA_ARGS__)

Definition at line 89 of file messages.h.

◆ TMSG

#define TMSG (   f,
  ... 
)    if (debug_flag_get(DBG_PREFIX(f))) hpcrun_pmsg(#f, __VA_ARGS__)

Definition at line 93 of file messages.h.

Function Documentation

◆ hpcrun_abort_w_info()

void hpcrun_abort_w_info ( void(*)(void)  info,
const char *  fmt,
  ... 
)

Definition at line 206 of file messages-sync.c.

Here is the call graph for this function:

◆ hpcrun_amsg()

void hpcrun_amsg ( const char *  fmt,
  ... 
)

Definition at line 199 of file messages-async.c.

Here is the call graph for this function:

◆ hpcrun_below_pmsg_threshold()

int hpcrun_below_pmsg_threshold ( void  )

Definition at line 270 of file messages-sync.c.

Here is the caller graph for this function:

◆ hpcrun_emsg()

void hpcrun_emsg ( const char *  fmt,
  ... 
)

Definition at line 137 of file messages-async.c.

Here is the call graph for this function:

◆ hpcrun_emsg_valist()

void hpcrun_emsg_valist ( const char *  fmt,
va_list_box box 
)

Definition at line 130 of file messages-async.c.

Here is the call graph for this function:

◆ hpcrun_exit_on_error()

void hpcrun_exit_on_error ( int  ret,
int  ret_expected,
const char *  fmt,
  ... 
)

Definition at line 193 of file messages-sync.c.

Here is the call graph for this function:

◆ hpcrun_nmsg()

void hpcrun_nmsg ( pmsg_category  flag,
const char *  tag,
const char *  fmt,
  ... 
)

Definition at line 187 of file messages-async.c.

Here is the call graph for this function:

◆ hpcrun_nmsg_stderr()

void hpcrun_nmsg_stderr ( bool  echo_stderr,
pmsg_category  flag,
const char *  tag,
const char *  fmt,
  ... 
)

Definition at line 174 of file messages-async.c.

Here is the call graph for this function:

◆ hpcrun_pmsg()

void hpcrun_pmsg ( const char *  tag,
const char *  fmt,
  ... 
)

Definition at line 145 of file messages-async.c.

Here is the call graph for this function:

◆ hpcrun_pmsg_stderr()

void hpcrun_pmsg_stderr ( bool  echo_stderr,
pmsg_category  flag,
const char *  tag,
const char *  fmt,
  ... 
)

Definition at line 160 of file messages-async.c.

Here is the call graph for this function:

◆ hpcrun_stderr_log_msg()

void hpcrun_stderr_log_msg ( bool  copy_to_log,
const char *  fmt,
  ... 
)

Definition at line 233 of file messages-sync.c.

Here is the call graph for this function:

◆ hpcrun_up_pmsg_count()

void hpcrun_up_pmsg_count ( void  )

Definition at line 277 of file messages-sync.c.

Here is the caller graph for this function:

◆ limit_msgs()

void limit_msgs ( void  )

Definition at line 316 of file messages-async.c.

◆ messages_donothing()

void messages_donothing ( void  )

Definition at line 257 of file messages-sync.c.

◆ messages_fini()

void messages_fini ( void  )

Definition at line 167 of file messages-sync.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ messages_init()

void messages_init ( )

Definition at line 134 of file messages-sync.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ messages_logfile_create()

void messages_logfile_create ( )

Definition at line 147 of file messages-sync.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ messages_logfile_fd()

int messages_logfile_fd ( void  )

Definition at line 263 of file messages-sync.c.

Here is the caller graph for this function:

◆ unlimit_msgs()

void unlimit_msgs ( void  )

Definition at line 311 of file messages-async.c.