unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* A tip: how to display longer function names in profiler-report
@ 2020-12-21 16:32 Alan Mackenzie
  2020-12-21 17:15 ` Eli Zaretskii
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Alan Mackenzie @ 2020-12-21 16:32 UTC (permalink / raw)
  To: emacs-devel

Hello, Emacs.

It's annoyed me for a long time that profiler-report wastes so much
horizontal screen space, and truncates function names horribly.  And
that's in CC Mode, which has a very short package prefix, "c-".

When the functions being recorded are within jit-lock, I can easily
reach a nesting depth of 25.  That only leaves room for the first 23
characters of the name to be displayed.  This is inadequate.

The documentation of profiler.el is not good.  It is composed of a large
number of mainly small functions, few (if any) of which have an adequate
doc string or function comment.  Some configuration variables which
perhaps ought to be customisable likewise have no comments or doc
strings.

The variable which controls the widths of the comment name, number of
samples, and percentage columns is profiler-report-cpu-line-format.
It's default value is:

    ((50 left) (24 right
               ((19 right) (5 right))))

, which codes column sizes of 50, 19, and 5.  The 5 (for percentage) is
OK.  50 (defun name) is too small.  19 (number of samples) is too big -
that is broad enough to count up to 10^16 seconds, of the order of the
age of the universe.

So in my .emacs, I've adjusted these widths to 70, 9, and 5 with the
following incantation:

    (eval-after-load "profiler"
      '(setq profiler-report-cpu-line-format '((70 left)
                                                 (14 right ((9 right) (5 right))))))

.  I've now stopped being so annoyed at the profiler.

-- 
Alan Mackenzie (Nuremberg, Germany).



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-12-22 12:22 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-21 16:32 A tip: how to display longer function names in profiler-report Alan Mackenzie
2020-12-21 17:15 ` Eli Zaretskii
2020-12-21 17:34   ` Alan Mackenzie
2020-12-21 18:12     ` Eli Zaretskii
2020-12-21 18:52       ` Alan Mackenzie
2020-12-21 17:52 ` Stefan Kangas
2020-12-21 18:14   ` Alan Mackenzie
2020-12-21 20:24 ` Clément Pit-Claudel
2020-12-21 21:24   ` Alan Mackenzie
2020-12-21 21:34     ` Clément Pit-Claudel
2020-12-21 22:09       ` Alan Mackenzie
2020-12-22 12:22       ` Alan Mackenzie

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).