From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Olson Newsgroups: gmane.emacs.devel Subject: Re: Patch: Add call graph to elp.el Date: Sun, 10 Feb 2008 15:09:16 -0600 Message-ID: <8763wwmscj.fsf@grepfind.mwolson.org> References: <47AD63E8.8080308@fastmail.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1202681461 30638 80.91.229.12 (10 Feb 2008 22:11:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 10 Feb 2008 22:11:01 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 10 23:11:24 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JOKOQ-0005lJ-O8 for ged-emacs-devel@m.gmane.org; Sun, 10 Feb 2008 23:11:23 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JOKNx-0003G9-H6 for ged-emacs-devel@m.gmane.org; Sun, 10 Feb 2008 17:10:53 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JOKNE-0002zn-MA for emacs-devel@gnu.org; Sun, 10 Feb 2008 17:10:08 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JOKND-0002z8-7P for emacs-devel@gnu.org; Sun, 10 Feb 2008 17:10:08 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JOKNC-0002z1-Sm for emacs-devel@gnu.org; Sun, 10 Feb 2008 17:10:06 -0500 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JOKNC-0001eX-Af for emacs-devel@gnu.org; Sun, 10 Feb 2008 17:10:06 -0500 Original-Received: from root by ciao.gmane.org with local (Exim 4.43) id 1JOKN8-0002SP-RX for emacs-devel@gnu.org; Sun, 10 Feb 2008 22:10:02 +0000 Original-Received: from pool-72-69-4-31.sbndin.dsl-w.verizon.net ([72.69.4.31]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 10 Feb 2008 22:10:02 +0000 Original-Received: from mwolson by pool-72-69-4-31.sbndin.dsl-w.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 10 Feb 2008 22:10:02 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 64 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: pool-72-69-4-31.sbndin.dsl-w.verizon.net Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEU1QytIVTlZY0dqc1N6 hGGJl3qZpZCtuKXsjxzFAAACW0lEQVR42l2UXXrqIBCGk67Aoe29Ac4CTPDcGwZ73wLdQDOuQLP9 8wHG9hT1Mc6bb/5jp7Xed92TVrqeCYfKRVc+XdfDbqbJ8TixG1UDu2a3xkf2H+z+A6Qn7Xk71AA8 kdJmZg4xpcTshgr2JQSurAswhwDFYQN9r4yxx1BIQqBTBbvqahw9hxRSLOBdFVA89TTOvgSoMaLf ABTWOg5Z8lLRNyD7x4WSVHU1DZurThn2HI9Oa561JhTSDUWxq64YqRlmrcdhA73y3rmJY1okotDT NzDO2XNGZPnS7A4b6NQ8foQFN2eJmEBR7Du1Q/DRh7R4O50BrGmu0F8i49Iya+ScvtDNqkADB8zD pwU9wTu9c8msdNYOO0JvYYyREd9xBOh7zSNc2WMZUYzIDHOpU0Kxe5o9o0eccsr5mNLcwHhC8DoM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UYwCpW1w3+KrgsiyE1JOBn699c8UbooswJZxbqSFe8C3D6FyRra01Urftzbgc8IQwcLO11taW S6not75pGjedDGGmPeIABWN1+Hwkl0TM57lUjBX2oxtnVmttSu1ncHHbyipssEIPTJXtFmNvrMIC tFzO+SpbtzNwmvIq5yLBSyWrlZ/BwZSmUOX0INOXsoDoq9ppkS4k3bQzwAB7wZbgOPwCLnGfpwtI 2Opu+C/pHWTCf4B9eQfosvkFVxuArNjDplAAAAAASUVORK5CYII= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:WBrm3t/Ll8+52OANoi+zcDU69KM= X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:88674 Archived-At: --=-=-= Content-Transfer-Encoding: quoted-printable Christian Ohler writes: > The attached patch makes elp.el record and display call graph > information. This makes the profiler much more useful. Just a few nitpicks before reviewing more in-depth. > Christian. > --- elp.el 28 Jan 2008 22:48:53 +0100 1.43 > +++ elp.el 08 Feb 2008 21:58:18 +0100=09 > @@ -126,6 +126,8 @@ > > ;;; Code: > > +(require 'cl) > + Should be: (eval-when-compile (require 'cl)) > @@ -245,7 +262,7 @@ > ;; definition. > (elp-restore-function funsym) > (let* ((funguts (symbol-function funsym)) > - (infovec (vector 0 0 funguts)) > + (infovec (vector 0 0 funguts (list) (list))) > (newguts '(lambda (&rest args)))) > ;; we cannot profile macros > (and (eq (car-safe funguts) 'macro) Use a tab instead of a space at the beginning, because that is what is done in the rest of the file. > @@ -386,6 +403,8 @@ > (aset info 0 0) ;reset call counter > (aset info 1 0.0) ;reset total time > ;; don't muck with aref 2 as that is the old symbol definition > + (aset info 3 (list)) ;reset children > + (aset info 4 (list)) ;reset parents > )) Tab instead of space between code and comment. =2D-=20 | Michael Olson | FSF Associate Member #652 | | http://mwolson.org/ | Hobbies: Lisp, HCoop | | Projects: Emacs, Muse, ERC, EMMS, ErBot, DVC, Planner | `-------------------------------------------------------' --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFHr2f++1Ho2POo0xkRAsVxAJ9hsnGZwAZMtfvAT0lDraVXJMJSBQCdGRSX OeDX+Gy07boJ1nKyIJ8lQ9M= =wacB -----END PGP SIGNATURE----- --=-=-=--