From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r110342: Count overruns when profiling; change units to ns. Date: Tue, 02 Oct 2012 22:00:13 -0700 Organization: UCLA Computer Science Department Message-ID: <506BC65D.1040502@cs.ucla.edu> References: <506B1850.1070404@cs.ucla.edu> <83wqz8ajra.fsf@gnu.org> <506B5418.8030506@cs.ucla.edu> <83mx04a7zx.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1349240453 6676 80.91.229.3 (3 Oct 2012 05:00:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Oct 2012 05:00:53 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 03 07:00:57 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TJH4P-0005F3-FF for ged-emacs-devel@m.gmane.org; Wed, 03 Oct 2012 07:00:29 +0200 Original-Received: from localhost ([::1]:35165 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJH4J-0002Am-JX for ged-emacs-devel@m.gmane.org; Wed, 03 Oct 2012 01:00:23 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42474) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJH4H-0002Af-7l for emacs-devel@gnu.org; Wed, 03 Oct 2012 01:00:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TJH4F-0000Nz-Mo for emacs-devel@gnu.org; Wed, 03 Oct 2012 01:00:21 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:34709) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJH4C-0000HM-P0; Wed, 03 Oct 2012 01:00:16 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id EEFD639E800E; Tue, 2 Oct 2012 22:00:09 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ye4S8I9dY5Rm; Tue, 2 Oct 2012 22:00:09 -0700 (PDT) Original-Received: from [192.168.1.3] (pool-108-23-119-2.lsanca.fios.verizon.net [108.23.119.2]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 2CB9FA60003; Tue, 2 Oct 2012 22:00:09 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120912 Thunderbird/15.0.1 In-Reply-To: <83mx04a7zx.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 131.179.128.62 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:153979 Archived-At: On 10/02/2012 02:17 PM, Eli Zaretskii wrote: > Does getitimer report correct values for reasonable intervals, though? No, I'm afraid it does the same thing for larger intervals that it does for tiny ones. That is, it doesn't tell you the interval that is actually used. > We could call clock_gettime once in 10 or 100 samples, say. Why bother? Call it once at the start of the run, and once at the end. That's enough to give us an average. > showing a vague "number of samples" is hardly useful enough. It'd be easy to replace "CPU samples" with something like "CPU samples (10 ms)", to give users a feel for what the nominal sample size is. And we can simply reset the counters to zero in the rare cases where the user changes the sampling interval, so that we needn't worry about mixing interval sizes in the statistics.