[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] /srv/bzr/emacs/trunk r110342: Count overruns when prof
From: |
Stefan Monnier |
Subject: |
Re: [Emacs-diffs] /srv/bzr/emacs/trunk r110342: Count overruns when profiling; change units to ns. |
Date: |
Tue, 02 Oct 2012 22:05:34 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) |
> Which AFAIK is (was) a bug in profiler: it cannot assume that what it
> asked setitimer will actually be obeyed. To see what interval is
> actually being loaded into the timer, one needs to call getitimer
> after setitimer returns.
If enough systems are able to return a different value in getitimer than
set in setitimer, then it would be good to do that (and signal an error
or at least output a message if the return value is different).
> I believe on Posix systems this boils down to calling clock_gettime
> with the correct timer ID (and there are equivalent APIs on
> MS-Windows).
That would be a nice approach, indeed, when CLOCK_PROCESS/THREAD_CPUTIME_ID
is supported. We still need to worry about wraparound: counting ms
gives us a wraparound after 512M ms = 512ks =~ 5 days, which seems
acceptable, but anything finer would not fly without a good solution to
the wraparound.
> Then we could satisfy Stefan's design goal of having
> compatible profiles with different sampling period.
It's not terribly important, but it is desirable.
Stefan
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r110342: Count overruns when profiling; change units to ns., Stefan Monnier, 2012/10/02
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r110342: Count overruns when profiling; change units to ns., Paul Eggert, 2012/10/02
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r110342: Count overruns when profiling; change units to ns., Eli Zaretskii, 2012/10/02
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r110342: Count overruns when profiling; change units to ns., Paul Eggert, 2012/10/02
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r110342: Count overruns when profiling; change units to ns., Eli Zaretskii, 2012/10/02
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r110342: Count overruns when profiling; change units to ns., Paul Eggert, 2012/10/03
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r110342: Count overruns when profiling; change units to ns., Eli Zaretskii, 2012/10/03
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r110342: Count overruns when profiling; change units to ns., Paul Eggert, 2012/10/03
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r110342: Count overruns when profiling; change units to ns., Eli Zaretskii, 2012/10/03
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r110342: Count overruns when profiling; change units to ns.,
Stefan Monnier <=
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r110342: Count overruns when profiling; change units to ns., Paul Eggert, 2012/10/03
- Re: [Emacs-diffs] /srv/bzr/emacs/trunk r110342: Count overruns when profiling; change units to ns., Stefan Monnier, 2012/10/03