88 # include "messages.flag-defns" 100 #define E(s) DBG_PREFIX(s) 107 E(CPU_GPU_BLAME_CTL),
172 #define N_DBG_CATEGORIES sizeof(dbg_tbl)/sizeof(dbg_tbl[0]) 196 char *df_trace = getenv(
"HPCRUN_DEBUG_FLAGS_DEBUG");
197 int debug_mode_only = (df_trace == 0) ? 0 : 1;
202 if (debug_mode_only){
203 monitor_real_exit(1);
226 if (i < N_DBG_CATEGORIES){
230 fprintf(stderr,
"debug flag (unknown) = %d\n", i);
253 for (
int i=0; i < flag_list->
n_entries; i++){
262 const char *result =
NULL;
274 if (strcmp(
dbg_tbl[i],s) == 0){
285 if (debug_initialization) {
286 fprintf(stderr,
"debug flag input string = %s\n\n", in);
291 if (strcmp(f,
"ALL") == 0){
295 if (debug_initialization) {
296 fprintf(stderr,
"\tprocessing debug flag token %s\n", f);
300 if (debug_initialization) {
301 fprintf(stderr,
"\tdebug flag token value = %d\n\n", ii);
306 fprintf(stderr,
"\tdebug flag token %s not recognized\n\n", f);
315 char *s = getenv(
"HPCRUN_DEBUG_FLAGS");
void debug_flag_set(pmsg_category flag, int val)
struct flag_list_t flag_list_t
static void debug_flag_process_string(char *in, int debug_initialization)
static flag_list_t all_list
static void debug_flag_set_list(flag_list_t *flag_list, int v)
static void debug_flag_process_env(int debug_initialization)
static int debug_flag_name_lookup(const char *s)
static const char * debug_flag_name_get(int i)
static int dbg_flags[N_DBG_CATEGORIES]
static void debug_flag_set_all(int v)
char * start_tok(char *lst)
static pmsg_category all_list_entries[]
int debug_flag_get(pmsg_category flag)