This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Dataflow branch review #4


I forgot to include the changelog. Here we go:

gcc/ChangeLog.dataflow

2006-06-06 Seongbae Park <seongbae.park@gmail.com>

       * opts.c (common_handle_option): Handle new option -fdbg-cnt-list.
       * dbgcnt.c (dbg_cnt_set_limit_by_name): Return value to
indicate an error.
       (dbg_cnt_process_single_pair, dbg_cnt_list_all_counters): New functions
       (dbg_cnt_process_opt): Issue an error on a bad argument.
       * dbgcnt.h (dbg_cnt_list_all_counters): New function declaration.
       * common.opt: New option -fdbg-cnt-list.
       * doc/invoke.texi: New option -fdbg-cnt-list and -fdbg-cnt.

On 6/6/07, Seongbae Park (박성배, 朴成培) <seongbae.park@gmail.com> wrote:
Attached is the patch that cleans up dbgcnt following Ian's review.
Bootstrapped on x86-64.
The doc changes has been manually inspected.


On 05 Jun 2007 21:29:24 -0700, Ian Lance Taylor <iant@google.com> wrote: ... > In dbgcnt.c: > > + while (comma) > + { > + colon = strchr (comma + 1, ':'); > + if (colon == NULL || !(colon[1] >= '0' && colon[1] <= '9')) > + return; > + dbg_cnt_set_limit_by_name (comma + 1, colon - (comma + 1), atoi (colon + 1)); > + comma = strchr (colon + 1, ','); > + } > > It seems like if you make a mistake writing the parameter you will get > no warning. I think that is a bad idea, even for debugging code. > There should be a warning for invalid option syntax or for a > nonexistent parameter. > > > In dbgcnt.def: > > + By default, all limits are UINT_MAX. > + Since debug count is unsigned int, <= UINT_MAX returns true always. > + i.e. dbg_cnt() returns true always regardless of the counter value > + (although it still counts the event). > + Use -fdbg-cnt=counter1:N,counter2:M,... > + which sets the limit for counter1 to N, and the limit for counter2 to M, etc. > + e.g. setting a limit to zero will make dbg_cnt () return false *always*. > > This needs to be documented in doc/invoke.texi. It's probably not > necessary to document each of the support debugging names.

--
#pragma ident "Seongbae Park, compiler, http://seongbae.blogspot.com";




--
#pragma ident "Seongbae Park, compiler, http://seongbae.blogspot.com";

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]