71 #include <sys/param.h> 72 #include <sys/types.h> 94 #include <messages/messages.i> 152 if (getenv(
"HPCRUN_LOG_STDERR") !=
NULL) {
174 char *mesg =
"hpctoolkit warning: unable to access log file " 175 "(maybe application closed the file descriptor)\n";
176 write(2, mesg, strlen(mesg));
195 if (ret == ret_expected) {
209 char fstr[MSG_BUF_SIZE];
212 strncat(fstr, fmt, MSG_BUF_SIZE - strlen(fstr) - 5);
225 write(2, buf, strlen(buf));
228 monitor_real_exit(-1);
236 char fstr[MSG_BUF_SIZE];
240 strncat(fstr, fmt, MSG_BUF_SIZE - 5);
246 write(2, buf, strlen(buf));
249 if (copy_to_log &&
log_file != stderr){
#define va_list_box_end(box)
ssize_t MONITOR_EXT_WRAP_NAME() write(int fd, const void *buf, size_t count)
int hpcrun_msg_vns(char *buf, size_t len, const char *fmt, va_list_box *box)
void messages_logfile_create()
static void spinlock_unlock(spinlock_t *l)
int messages_logfile_fd(void)
void hpcrun_stderr_log_msg(bool copy_to_log, const char *fmt,...)
#define va_list_box_start(box, arg)
int hpcrun_below_pmsg_threshold(void)
void hpcrun_exit_on_error(int ret, int ret_expected, const char *fmt,...)
void hpcrun_up_pmsg_count(void)
void hpcrun_abort_w_info(void(*info)(void), const char *fmt,...)
static int global_msg_count
int hpcrun_open_log_file(void)
void messages_donothing(void)
int hpcrun_get_rank(void)
void hpcrun_write_msg_to_log(bool echo_stderr, bool add_thread_id, const char *tag, const char *fmt, va_list_box *box)
int hpcrun_rename_log_file(int rank)
static int const threshold
bool hpcrun_get_disabled(void)