bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Would timevar be accepted in gnulib?


From: Akim Demaille
Subject: Re: Would timevar be accepted in gnulib?
Date: Mon, 24 Sep 2018 22:47:19 +0200

Hey Bruno!

> Le 23 sept. 2018 à 23:46, Bruno Haible <address@hidden> 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 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.)

Sure, will do.

>> 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,

Will do.  Yet I don’t know why we should mention ‘iterable’.
List matters as it’s visible in the output, but iterable is
only an implementation detail.

>  - an explanation about the ID: is it a run-time entity (i.e. will it be
>    printed), a compile-time entity, or both?

Sure.

> 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 :/

>  * 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?

I don’t have a use case here, so I dunno what users would expect.

> 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?

I’ll have to study this first.  Not too mention that I have no experience
of the portability of these guys.  And that we will have to introduce
heuristics to decide which unit to use.  So I won’t submit timevar
immediately, I’ll have to do my homework fist.

Cheers!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]