HPCToolkit
messages-async.c File Reference
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include "disabled.h"
#include "messages.h"
#include "messages.i"
#include "fmt.h"
#include "sample_event.h"
#include "sample_prob.h"
#include "thread_data.h"
#include "thread_use.h"
Include dependency graph for messages-async.c:

Go to the source code of this file.

Macros

#define DEBUG_PMSG_ASYNC   0
 

Functions

static void create_msg (char *buf, size_t buflen, bool add_thread_id, const char *tag, const char *fmt, va_list_box *box)
 
void hpcrun_emsg_valist (const char *fmt, va_list_box *box)
 
void hpcrun_emsg (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_nmsg (pmsg_category flag, const char *tag, const char *fmt,...)
 
void hpcrun_amsg (const char *fmt,...)
 
void hpcrun_write_msg_to_log (bool echo_stderr, bool add_thread_id, const char *tag, const char *fmt, va_list_box *box)
 
static char * safely_get_tid_str (char *buf, size_t len)
 
void unlimit_msgs (void)
 
void limit_msgs (void)
 

Variables

static const unsigned int msg_limit = 5000
 
spinlock_t pmsg_lock = SPINLOCK_UNLOCKED
 
static unsigned int msgs_out = 0
 
static bool check_limit = true
 

Macro Definition Documentation

◆ DEBUG_PMSG_ASYNC

#define DEBUG_PMSG_ASYNC   0

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

Function Documentation

◆ create_msg()

static void create_msg ( char *  buf,
size_t  buflen,
bool  add_thread_id,
const char *  tag,
const char *  fmt,
va_list_box box 
)
static

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

Here is the call graph for this function:
Here is the caller 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_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_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_write_msg_to_log()

void hpcrun_write_msg_to_log ( bool  echo_stderr,
bool  add_thread_id,
const char *  tag,
const char *  fmt,
va_list_box box 
)

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

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

◆ limit_msgs()

void limit_msgs ( void  )

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

◆ safely_get_tid_str()

static char* safely_get_tid_str ( char *  buf,
size_t  len 
)
static

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

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

◆ unlimit_msgs()

void unlimit_msgs ( void  )

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

Here is the caller graph for this function:

Variable Documentation

◆ check_limit

bool check_limit = true
static

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

◆ msg_limit

const unsigned int msg_limit = 5000
static

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

◆ msgs_out

unsigned int msgs_out = 0
static

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

◆ pmsg_lock

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