From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#27397: [PATCH] New commands for bulk tracing of elisp functions Date: Mon, 19 Jun 2017 11:56:23 +0200 Message-ID: <871sqg5mig.fsf@detlef> References: <1348823a-7623-8146-8cc0-8c0eff13e458@orcon.net.nz> <34fcc090-6a8b-42de-b6c8-df182f8de938@yandex.ru> <8760fs5sjw.fsf@detlef> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1497866236 13173 195.159.176.226 (19 Jun 2017 09:57:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 19 Jun 2017 09:57:16 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: 27397@debbugs.gnu.org, Dmitry Gutov To: Phil Sainty Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 19 11:57:10 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMtQj-0002z0-Qq for geb-bug-gnu-emacs@m.gmane.org; Mon, 19 Jun 2017 11:57:09 +0200 Original-Received: from localhost ([::1]:41478 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMtQn-0003Ez-AQ for geb-bug-gnu-emacs@m.gmane.org; Mon, 19 Jun 2017 05:57:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54843) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMtQh-0003El-QP for bug-gnu-emacs@gnu.org; Mon, 19 Jun 2017 05:57:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dMtQc-0003JR-WF for bug-gnu-emacs@gnu.org; Mon, 19 Jun 2017 05:57:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52952) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dMtQc-0003JF-TL for bug-gnu-emacs@gnu.org; Mon, 19 Jun 2017 05:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dMtQc-00024h-Fg for bug-gnu-emacs@gnu.org; Mon, 19 Jun 2017 05:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Jun 2017 09:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27397 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 27397-submit@debbugs.gnu.org id=B27397.14978661977935 (code B ref 27397); Mon, 19 Jun 2017 09:57:02 +0000 Original-Received: (at 27397) by debbugs.gnu.org; 19 Jun 2017 09:56:37 +0000 Original-Received: from localhost ([127.0.0.1]:55629 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMtQD-00023v-1v for submit@debbugs.gnu.org; Mon, 19 Jun 2017 05:56:37 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]:61301) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dMtQB-00023h-VZ for 27397@debbugs.gnu.org; Mon, 19 Jun 2017 05:56:36 -0400 Original-Received: from detlef.gmx.de ([212.86.44.161]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MS5Dm-1dFprf1xhS-00TFqP; Mon, 19 Jun 2017 11:56:25 +0200 In-Reply-To: (Phil Sainty's message of "Mon, 19 Jun 2017 21:35:11 +1200") X-Provags-ID: V03:K0:tsGD5pflu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enThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:133748 Archived-At: Phil Sainty writes: Hi Phil, >> There's no package "tramp-". Better would be >> >> (trace-regexp "^tramp-") > > To be clear, the two are functionally equivalent; but if you'd prefer > it written that way then I'm happy to make that change. Ahh, my error. I thought that `trace-package' takes a package name (or symbol), and traces only all functions which have been loaded by this package. (trace-package 'tramp) would then trace the function `tramp-file-name-handler (defined in tramp.el) , but not the function `tramp-sh-file-name-handler'. The latter one is defined in tramp-sh.el. > With respect to the manual entry being discussed here, we could > trivially show code to `require' all of the tramp-* libraries prior > to calling trace-package or trace-regexp. e.g.: > > (mapc 'require '(tramp tramp-adb tramp-cache tramp-cmds > tramp-compat tramp-ftp tramp-gvfs tramp-sh > tramp-smb tramp-uu trampver)) > > (or else something which automatically locates library names starting > with "tramp-" and loads them all). That's not what I want. Often, I hunt bugs related to the order of autoloaded functions, and this order shall be kept also when tracing. > Perhaps you're actually be suggesting some kind of `eval-after-load' > tracing behaviour, though? Yes, that's the idea. If `trace-package' uses as argument a package name as proposed above, the instrumentation shall happen in an `eval-after-load' form for that package. `trace-regexp', on the other hand, shall instrument the functions in a form added to `after-load-functions', additonally to the functions already loaded. > -Phil Best regards, Michael.