[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Would timevar be accepted in gnulib?
From: |
Bruno Haible |
Subject: |
Re: Would timevar be accepted in gnulib? |
Date: |
Sun, 23 Sep 2018 23:46:01 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-134-generic; KDE/5.18.0; x86_64; ; ) |
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. (Because it
wasn't obvious to me how to apply (a) to this use-case.)
> In Bison it reads:
>
> /* This file contains timing variable definitions, used by timevar.h
> and timevar.c.
>
> Syntax:
>
> DEFTIMEVAR (id, name)
>
> where ID is the enumeral value used to identify the timing
> variable, and NAME is a character string describing its purpose. */
I'm missing two things:
- the words "iterable" and "list" in the description of the concept,
- an explanation about the ID: is it a run-time entity (i.e. will it be
printed), a compile-time entity, or both?
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?
* When the program creates additional threads and these threads terminate
within the particular phase, which of the times (usr, sys, wall)
include the times of the threads?
Another question is: what is the resolution of the timevar facility?
I understand that for GCC. a resolution of 0.01 seconds is perfectly
enough. But other programs execute faster and thus would be interested
in microsecond resolution. Which of the high-resolution timers Linux
provides [1][2] are actually useful in this context?
Bruno
[1]
https://stackoverflow.com/questions/6749621/how-to-create-a-high-resolution-timer-in-linux-to-measure-program-performance
[2] http://man7.org/linux/man-pages/man2/clock_gettime.2.html
- Would timevar be accepted in gnulib?, Akim Demaille, 2018/09/21
- Re: Would timevar be accepted in gnulib?, Paul Eggert, 2018/09/21
- Re: Would timevar be accepted in gnulib?, Bruno Haible, 2018/09/21
- Re: Would timevar be accepted in gnulib?, Akim Demaille, 2018/09/22
- Re: Would timevar be accepted in gnulib?, Bruno Haible, 2018/09/23
- Re: Would timevar be accepted in gnulib?, Bruno Haible, 2018/09/23
- Re: Would timevar be accepted in gnulib?, Akim Demaille, 2018/09/23
- Re: Would timevar be accepted in gnulib?, Bruno Haible, 2018/09/23
- Re: Would timevar be accepted in gnulib?, Akim Demaille, 2018/09/23
- Re: Would timevar be accepted in gnulib?,
Bruno Haible <=
- Re: Would timevar be accepted in gnulib?, Akim Demaille, 2018/09/24
- Re: Would timevar be accepted in gnulib?, Bruno Haible, 2018/09/24
- Re: Would timevar be accepted in gnulib?, Akim Demaille, 2018/09/27
- Re: Would timevar be accepted in gnulib?, Bruno Haible, 2018/09/29
- Re: Would timevar be accepted in gnulib?, Akim Demaille, 2018/09/30