Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: time builtin vs. time(1): difference in memory numbers



2010-12-05 19:25 GMT+01:00 Anonymous <swell.k@xxxxxxxxx>:
> Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> writes:
>
>> On Dec 5,  2:38pm, Anonymous wrote:
>> } Subject: Re: time builtin vs. time(1): difference in memory numbers
>> }
>> } According to getrusage(2) on BSDs ixrss/idrss/isrss are "expressed in
>> } units of kilobytes * ticks-of-execution". So, I've made a quick hack
>> }
>> }   http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/152820
>>
>> Looks like it'd be appropriate to wrap that first hunk in
>> #ifdef _SC_CLK_TCK
>> ??
>
> Does Linux needs to divide them by ticks, too?
>
>>
>> I'm curious if FreeBSD has anything like this (from <asm/param.h>
>> on RHEL4):
>>
>> #define HZ sysconf(_SC_CLK_TCK)
>
> No but I'm just an average user. Note, sysconf(_SC_CLK_TCK) returns
> CLK_TCK (a constant) defined in <time.h> that may differ from the value
> used by getrusage(). [1]
>
> [1] NetBSD does get its value from kern.clockrate sysctl
>     and there was a discussion to port it to FreeBSD
>       http://docs.freebsd.org/cgi/mid.cgi?20020701142849.U6692-100000

I would like to revive this thread as we are having this patch in
FreeBSD for a while now.

https://people.freebsd.org/~bapt/getrusage.diff

What would be the next step to get it upstream (and modified if needed?)

Best regards,
Bapt



Messages sorted by: Reverse Date, Date, Thread, Author