diff options
Diffstat (limited to 'gcc/dbgcnt.c')
-rw-r--r-- | gcc/dbgcnt.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/dbgcnt.c b/gcc/dbgcnt.c index 8ab5fd0ea52..47ba28a9648 100644 --- a/gcc/dbgcnt.c +++ b/gcc/dbgcnt.c @@ -23,6 +23,9 @@ See dbgcnt.def for usage information. */ #include "system.h" #include "coretypes.h" #include "errors.h" +#include "tm.h" +#include "rtl.h" +#include "output.h" #include "dbgcnt.h" @@ -58,6 +61,10 @@ bool dbg_cnt (enum debug_counter index) { count[index]++; + if (dump_file && count[index] == limit[index]) + fprintf (dump_file, "***dbgcnt: limit reached for %s.***\n", + map[index].name); + return dbg_cnt_is_enabled (index); } @@ -132,7 +139,8 @@ dbg_cnt_process_opt (const char *arg) /* Print name, limit and count of all counters. */ -void dbg_cnt_list_all_counters (void) +void +dbg_cnt_list_all_counters (void) { int i; printf (" %-30s %-5s %-5s\n", "counter name", "limit", "value"); |