44 if (!
EM_ESCOPE(escope) || (ssize_t)size <= 0)
51 char *file = va_arg(args,
char*);
52 const char *func = va_arg(args,
const char*);
53 const int line = va_arg(args,
const int);
54 const char *format = va_arg(args,
const char*);
55 const char *base = basename(file);
58 const uint64_t glob_err_cnt = load_global_err_cnt();
69 snprintf(eo_str,
sizeof(eo_str),
70 "EO:%" PRI_EO "-\"%s\" ", eo, eo_name);
71 eo_str[
sizeof(eo_str) - 1] =
'\0';
75 snprintf(str, size,
"\n"
76 "EM ERROR:0x%08X ESCOPE:0x%08X %s\n"
77 "core:%02i ecount:%" PRIu64
"(%" PRIu64
") %s:%i %s()\n",
79 glob_err_cnt, loc_err_cnt, base, line, func);
81 if (ret > 0 && ret < (int64_t)size) {
82 #pragma GCC diagnostic push
83 #pragma GCC diagnostic ignored "-Wformat-nonliteral"
84 ret += vsnprintf(str + ret, size - ret, format, args);
85 #pragma GCC diagnostic pop
86 if (ret > 0 && ret < (int64_t)size)
87 ret += snprintf(str + ret, size - ret,
"\n");
92 return MIN((int64_t)size, ret + 1);
118 for (
int i = 0; i < EM_MAX_CORES; i++) {
122 phys_core = logic_to_phys_core_id(i);
134 if (unlikely(tsp >= EM_DEBUG_TSP_LAST || tsp < 0))