From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Profiling *entire* Emacs Date: Mon, 31 Mar 2008 22:21:37 +0300 Message-ID: References: NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1206991396 17018 80.91.229.12 (31 Mar 2008 19:23:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 31 Mar 2008 19:23:16 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Mar 31 21:23:48 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JgPbf-0003Uf-JI for geh-help-gnu-emacs@m.gmane.org; Mon, 31 Mar 2008 21:23:47 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JgPb3-00038C-Ht for geh-help-gnu-emacs@m.gmane.org; Mon, 31 Mar 2008 15:23:09 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JgPZj-00025J-5x for help-gnu-emacs@gnu.org; Mon, 31 Mar 2008 15:21:47 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JgPZe-0001zz-II for help-gnu-emacs@gnu.org; Mon, 31 Mar 2008 15:21:46 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JgPZe-0001zg-DA for help-gnu-emacs@gnu.org; Mon, 31 Mar 2008 15:21:42 -0400 Original-Received: from romy.inter.net.il ([213.8.233.24]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JgPZe-0004K4-3C for help-gnu-emacs@gnu.org; Mon, 31 Mar 2008 15:21:42 -0400 Original-Received: from HOME-C4E4A596F7 (IGLD-80-230-21-134.inter.net.il [80.230.21.134]) by romy.inter.net.il (MOS 3.7.3-GA) with ESMTP id KQN39825 (AUTH halo1); Mon, 31 Mar 2008 22:21:37 +0300 (IDT) In-reply-to: (message from =?ISO-8859-1?Q?Nordl=F6w?= on Mon, 31 Mar 2008 04:44:26 -0700 (PDT)) X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.7-5.2 (or MacOS X 10.2-10.4) (2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:52922 Archived-At: > From: =?ISO-8859-1?Q?Nordl=F6w?= > Date: Mon, 31 Mar 2008 04:44:26 -0700 (PDT) > > I looking for a way to profile (instrument) entire Emacs preferrably > including both built-in- and lisp-functions. Is this possible? Emacs can be built with profiling on the C level enabled. You need to pass the -DPROFILING switch to the compiler. See the source file emacs.c for the details; not all platforms support this. > The > instrumentation built into Emacs does not seem be built for profiling > entire Emacs. Is there another way? Or is the only feasable way to > build Emacs with debug-symbols and run it through gprof or oprofile? The latter. > The main reason for desire is that my fancy additional font-locking > for different classes of operators, braces, function calls, etc are > very useful but far too slow. I'd suggest to use elp to profile the Lisp code, then, if you find that a significant amount of time is spent inside primitives written in C, profile on the C level.