This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Some (small) c++ compilation profiling data (oprofile)
On Tue, May 21, 2002 at 05:50:53AM +0100, John Levon wrote:
> On Mon, May 20, 2002 at 09:39:55PM -0700, Zack Weinberg wrote:
>
> > > 081a1f90 88239 1.04199 output_format
> > > 084107f4 92606 1.09356 dyn_string_append_cstr_len
> > > 0808bbc0 145033 1.71266 cp_thing
> > > 081a1dc0 148982 1.75929 wrap_text
> >
> > are only used to generate diagnostic messages.
>
> That's what I thought but ...
>
> > Did it spew a ton of errors before giving up?
>
> ... there was no "ton of errors". It did fail to compile one file
> but the error was short. Which perplexed me when I looked what
> those functions seemed to do :)
Ohh. I know what's going on. The C++ parser has this concept of
"tentative diagnostics", which result from one candidate parsing of an
expression. If it turns out that that wasn't the right parse, those
diagnostics get thrown away. Since a mistaken parse is likely to
result in error messages, there may be a lot of these.
And of course work on diagnostic generation has assumed that it isn't
performance critical, so that code is slow.
I can think of a couple ways to address the problem, but Mark probably
wants to make the thing work correctly first.
zw