From: Diego Novillo <dnovillo@google.com>
To: Lawrence Crowl <crowl@google.com>
Cc: reply@codereview.appspotmail.com, gcc-patches@gcc.gnu.org
Subject: Re: [pph] Debug Cleanup (issue4380046)
Date: Mon, 11 Apr 2011 13:01:00 -0000 [thread overview]
Message-ID: <BANLkTikWbkq8UOE=MNzRg+mHytQ6rLnR5A@mail.gmail.com> (raw)
In-Reply-To: <20110409020031.EBB9A222647@jade.mtv.corp.google.com>
On Fri, Apr 8, 2011 at 22:00, Lawrence Crowl <crowl@google.com> wrote:
> Split pph_output_tree into pph_output_tree and pph_output_tree_aux.
> The former is the primary external interface, and pph_output_tree_aux
> is the internal (recursive) auxillary, which is used for function
> bodies.
Hm, why? They both seem identical, except they check different tracing levels.
> 2011-04-08 Lawrence Crowl <crowl@google.com>
>
> * pph.c (*): Change use of flag_pph_debug to flag_pph_decls_debug
> for declaration dependence analysis.
> (pth_finish): Simplify inconsistency reporting.
> * name-lookup.c (add_decl_to_level): Change use of flag_pph_debug to
> flag_pph_decls_debug for declaration dependence analysis.
> * parser.c (cp_parser_elaborated_type_specifier): Change use of
> flag_pph_debug to flag_pph_decls_debug for declaration dependence
> analysis.
> * pph-streamer.h (pph_output_tree_aux): New.
> (*): Compare flag_pph_tracer against value.
> (pph_output_*): Ensure trace happens before write.
> (pph_output_string_with_length): Add trace for null case.
Regexps in function names in a ChangeLog entry are not allowed. Sorry :)
> --- 953,960 ----
> C++ Var(flag_pph_stats)
> -fpph-stats Enable statistics gathering for PPH
>
> ! fpph-tracer=
> ! C++ Joined RejectNegative UInteger Var(flag_pph_tracer)
> -fpph-tracer Enable tracing of PPH streaming operations
Could you add what the different levels mean to the help text?
> --- 119,139 ----
> /* Inline functions. */
>
> /* Output AST T to STREAM. If REF_P is true, output all the leaves of T
> ! as references. This function is the primary interface. */
> static inline void
> pph_output_tree (pph_stream *stream, tree t, bool ref_p)
> {
> ! if (flag_pph_tracer >= 1)
> ! pph_stream_trace_tree (stream, t);
> ! lto_output_tree (stream->ob, t, ref_p);
> ! }
> !
> ! /* Output AST T to STREAM. If REF_P is true, output all the leaves of T
> ! as references. this function is an internal auxillary routine. */
> ! static inline void
> ! pph_output_tree_aux (pph_stream *stream, tree t, bool ref_p)
> ! {
> ! if (flag_pph_tracer >= 3)
> pph_stream_trace_tree (stream, t);
> lto_output_tree (stream->ob, t, ref_p);
> }
Maybe just make the flag_pph_tracer level an argument to
pph_output_tree? I guess that in the absence of default arg values,
there is no optimum solution here.
Diego.
prev parent reply other threads:[~2011-04-11 13:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-09 2:00 Lawrence Crowl
2011-04-11 13:01 ` Diego Novillo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='BANLkTikWbkq8UOE=MNzRg+mHytQ6rLnR5A@mail.gmail.com' \
--to=dnovillo@google.com \
--cc=crowl@google.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=reply@codereview.appspotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).