zsh-workers
 help / color / mirror / code / Atom feed
From: Baptiste Daroussin <baptiste.daroussin@gmail.com>
To: Zsh workers <zsh-workers@zsh.org>
Subject: Re: time builtin vs. time(1): difference in memory numbers
Date: Sun, 16 Oct 2016 20:29:23 +0200	[thread overview]
Message-ID: <CAPKC6oJcCEtDYwhDcHJeFLQcbEBAZnAF=08G3VRU4fWBHbMvwQ@mail.gmail.com> (raw)
In-Reply-To: <86mxokm60k.fsf@gmail.com>

2010-12-05 19:25 GMT+01:00 Anonymous <swell.k@gmail.com>:
> Bart Schaefer <schaefer@brasslantern.com> 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


  reply	other threads:[~2016-10-16 18:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <868w06l3cq.fsf@gmail.com>
     [not found] ` <101204102844.ZM5983@torch.brasslantern.com>
     [not found]   ` <86tyisv48o.fsf@gmail.com>
     [not found]     ` <101205055913.ZM32440@torch.brasslantern.com>
2010-12-05 18:25       ` Anonymous
2016-10-16 18:29         ` Baptiste Daroussin [this message]
2016-10-17  8:47           ` Peter Stephenson
2016-10-17 16:27             ` Baptiste Daroussin
2016-10-17 19:49               ` Daniel Shahaf
2016-10-18 10:56                 ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPKC6oJcCEtDYwhDcHJeFLQcbEBAZnAF=08G3VRU4fWBHbMvwQ@mail.gmail.com' \
    --to=baptiste.daroussin@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).