Hi Bruno!
> Le 29 sept. 2018 à 19:54, Bruno Haible a écrit :
>
> Hi Akim,
>
>> Here is my initial proposal for timevar in gnulib.
>
> Thanks! The code looks well-commented now.
>
> I pushed it for you,
Thanks!
> after completing the ChangeLog entry.
8-)=) Sorry, I completely forgot that…
Hi Akim,
> Here is my initial proposal for timevar in gnulib.
Thanks! The code looks well-commented now.
I pushed it for you, after completing the ChangeLog entry.
Bruno
Hi!
Here is my initial proposal for timevar in gnulib.
Cheers!
commit 2e50fd35c46f6ffa1079f6939223cd36ba2fb71a
Author: Akim Demaille
Date: Thu Sep 27 07:00:42 2018 +0200
timevar: import from Bison
* m4/timevar.m4, modules/timevar, lib/timevar.h, lib/timevar.c,
*
Hi Akim,
> > Two other points worth documenting:
> > * When the program invokes subprocesses, which of the times (usr, sys,
> >wall) include the times of the subprocess, and with which multiplicity?
>
> I don’t know what you name multiplicity :/
Multiplicity is probably a wrong term. What
Hey Bruno!
> Le 23 sept. 2018 à 23:46, Bruno Haible a écrit :
>
> Hi Akim,
>
>>> But what about the list-of-lists use-case? ...
>> ...
>> DEFTIMEVAR (TV_FOO, "Foo phase")
>> DEFTIMEVAR (TV_FOO_BAR, "Foo: Bar phase")
>> DEFTIMEVAR (TV_FOO_BAZ, "Foo: Baz phase")
>
> Looks fine to me. So the
Hi Akim,
> > But what about the list-of-lists use-case? ...
> ...
> DEFTIMEVAR (TV_FOO, "Foo phase")
> DEFTIMEVAR (TV_FOO_BAR, "Foo: Bar phase")
> DEFTIMEVAR (TV_FOO_BAZ, "Foo: Baz phase")
Looks fine to me. So the approach (a) works fine with
lists-of-lists; it only needs to be documented.
Hi!
> Le 23 sept. 2018 à 15:08, Bruno Haible a écrit :
>
> Hi Akim,
>
>>> What do you think? Do you think the list-of-lists use-case makes sense?
>>> Do you think configuring the list at run time is something people may want
>>> to do?
>>
>> You have a strong point here. But I don’t know if
Hi Akim,
> > What do you think? Do you think the list-of-lists use-case makes sense?
> > Do you think configuring the list at run time is something people may want
> > to do?
>
> You have a strong point here. But I don’t know if there would
> be actual users for such dynamic timers.
OK, no
Hi Bruno!
> Le 23 sept. 2018 à 11:42, Bruno Haible a écrit :
>
> Hi Akim,
>
>> I’m not sure I understand what you mean here. The timers are
>> used in many places in the code, not just main(). We need some
>> global definition somewhere, and we want to iterate over them
>> when displaying
Addendum:
> Note that (c), like (a), has the benefit that adding a new timevar is a
> modification in a single place.
This is true only if all uses of the timevars are in a single C compilation
unit (e.g. the top-level). If the user wants to use them in different source
files, it requires 2
Hi Akim,
> > 1) Simplify. I don't see the point of the DEFTIMEVAR layer with the enum.
> > Couldn't the code just do
> > timevar_t tv_total;
> > timevar_t tv_reader;
> > ..
> > and
> > init_timevar ();
> > timevar_start (_total);
> >
> > timevar_push (_reader);
> >
Hi all,
Thanks for the answers!
> Le 21 sept. 2018 à 14:04, Bruno Haible a écrit :
>
> Hi Akim,
>
>> Would there be some interest for this in gnulib?
>
> There is well a place for modules like this one in gnulib. See
>
Paul Eggert ha escrit:
> It might be helpful to have it, though I don't offhand know of
> programs other than Bison and GCC that use that sort of thing.
GNU dico is another one (although it uses its own implementation).
Regards,
Sergey
Hi Akim,
> Would there be some interest for this in gnulib?
There is well a place for modules like this one in gnulib. See
https://www.gnu.org/software/gnulib/manual/html_node/Portability-and-Application-Code.html
> allow self-profiling. It does not aim at replacing real profiling
> tools, but
It might be helpful to have it, though I don't offhand know of programs other
than Bison and GCC that use that sort of thing. (Emacs has something in Emacs
Lisp instead.) The hard part, to my mind, would be the documentation.
Hi!
Bison has adopted, many years ago, timevars, a set of tools that
allow self-profiling. It does not aim at replacing real profiling
tools, but rather to report in a concise way the cost of various
phases in a program. For instance with Bison:
Execution times (seconds)
LALR(1)
16 matches
Mail list logo