From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Cody Goodman Newsgroups: gmane.emacs.devel Subject: Help debugging elisp and emacs display engine Date: Thu, 26 Nov 2015 17:35:17 -0600 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b15a2a901dfe605257a075f X-Trace: ger.gmane.org 1448597998 27712 80.91.229.3 (27 Nov 2015 04:19:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 27 Nov 2015 04:19:58 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 27 05:19:55 2015 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 1a2AVm-0006Gt-Dk for ged-emacs-devel@m.gmane.org; Fri, 27 Nov 2015 05:19:54 +0100 Original-Received: from localhost ([::1]:54559 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a2AVo-00063h-JB for ged-emacs-devel@m.gmane.org; Thu, 26 Nov 2015 23:19:56 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45592) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a264N-00087v-Ip for emacs-devel@gnu.org; Thu, 26 Nov 2015 18:35:20 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a264M-00026z-Hb for emacs-devel@gnu.org; Thu, 26 Nov 2015 18:35:19 -0500 Original-Received: from mail-pa0-x232.google.com ([2607:f8b0:400e:c03::232]:35532) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a264M-00026c-8g for emacs-devel@gnu.org; Thu, 26 Nov 2015 18:35:18 -0500 Original-Received: by pacej9 with SMTP id ej9so96607159pac.2 for ; Thu, 26 Nov 2015 15:35:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=OMG64MzQVjFZkrKi/gaE6XK5P1O0ZDZ+Ur68UFVreh0=; b=C6H3J0/629PhaZIiqLTaMCCYNorouOEbtG1P/U6d2FIaFDsqMhunT3hNyaPSwz92Z6 gqj4XvKub6DFit7oDEGfNygxK/gLci2Ccpmtos7b3JpNHHt6PdG3VU0yk5Htw6/+HXSe PWPws1tYaody74L+B1OJ5rcWW2R1LW+8eKvTTNigSPXxGI6COfJZSOoA7yUPFOzmvzGn eeHjLNWI2r186KANWtWX3V7ASnZYR0GWFO2bHatxK0cLo3sJNrTu22lSgG9hxyPOetWz 2vodq2DIBrjYsv9152kB3PouO+Zcv3k7emCKPoNntCNIVywnERGSBPpj3oHmcdB1Nemo Xatw== X-Received: by 10.66.234.8 with SMTP id ua8mr63413148pac.45.1448580917352; Thu, 26 Nov 2015 15:35:17 -0800 (PST) Original-Received: by 10.66.241.69 with HTTP; Thu, 26 Nov 2015 15:35:17 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c03::232 X-Mailman-Approved-At: Thu, 26 Nov 2015 23:19:52 -0500 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:195335 Archived-At: --047d7b15a2a901dfe605257a075f Content-Type: text/plain; charset=UTF-8 I'm trying to debug emacs scrolling issues in long files, this elisp[0] doesn't seem to benchmark the redrawing or slownesses and claims "Elapsed time: 0.000003s". I'm guessing this is because of the problem residing in the display engine that is written in C? I'm also trying to follow how scroll-up-command passes values or sends arguments to the display engine so I know where to start profiling it and digging deeper into this problem. When I get the following cpu report, it's not clear where/how the display engine is called: - command-execute 3526 99% - call-interactively 3526 99% - funcall-interactively 3147 88% - scroll-up-command 2900 81% - apply 2900 81% - # 2900 81% - apply 2896 81% # 2896 81% How do I begin to debug these compiled functions? How do I trace the context/variables that apply might send to the display engine? Thanks in advance for any help. 0: elisp code (defun test-long-line-scrolling (n) (with-selected-window (get-buffer-window "long-lines-file-test-emacs.txt") (goto-char (point-max)) (dolist '(number-sequence 0 n) (scroll-down)))) ;; TODO: lookup how benchmark works (benchmark 10 (test-long-line-scrolling 100)) --047d7b15a2a901dfe605257a075f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: base64 PGRpdiBkaXI9Imx0ciI+SSYjMzk7bSB0cnlpbmcgdG8gZGVidWcgZW1hY3Mgc2Nyb2xsaW5nIGlz c3VlcyBpbiBsb25nIGZpbGVzLCB0aGlzIGVsaXNwWzBdIGRvZXNuJiMzOTt0IHNlZW0gdG8gYmVu Y2htYXJrIHRoZSByZWRyYXdpbmcgb3Igc2xvd25lc3NlcyBhbmQgY2xhaW1zICZxdW90O0VsYXBz ZWQgdGltZTogMC4wMDAwMDNzJnF1b3Q7LiBJJiMzOTttIGd1ZXNzaW5nIHRoaXMgaXMgYmVjYXVz ZSBvZiB0aGUgcHJvYmxlbSByZXNpZGluZyBpbiB0aGUgZGlzcGxheSBlbmdpbmUgdGhhdCBpcyB3 cml0dGVuIGluIEM/PGJyPjxicj5JJiMzOTttIGFsc28gdHJ5aW5nIHRvIGZvbGxvdyBob3cgc2Ny b2xsLXVwLWNvbW1hbmQgcGFzc2VzIHZhbHVlcyBvciBzZW5kcyBhcmd1bWVudHMgdG8gdGhlIGRp c3BsYXkgZW5naW5lIHNvIEkga25vdyB3aGVyZSB0byBzdGFydCBwcm9maWxpbmcgaXQgYW5kIGRp Z2dpbmcgZGVlcGVyIGludG8gdGhpcyBwcm9ibGVtLjxicj48YnI+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