unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Philipp Stephani <p.stephani2@gmail.com>
To: "Štěpán Němec" <stepnem@gmail.com>
Cc: 40335@debbugs.gnu.org, Noam Postavsky <npostavs@gmail.com>
Subject: bug#40335: 27.0.90; elp-not-profilable not up to date
Date: Fri, 12 Nov 2021 20:56:18 +0100	[thread overview]
Message-ID: <CAArVCkQEW4RupKPuUFKShJw_DmcbuYQKtavNrvUrP=LGWdUhuA@mail.gmail.com> (raw)
In-Reply-To: <87o8rv9vgy.fsf@gmail.com>

Am Mo., 13. Apr. 2020 um 18:54 Uhr schrieb Štěpán Němec <stepnem@gmail.com>:
>
> On Mon, 13 Apr 2020 12:05:06 -0400
> Noam Postavsky wrote:
>
> >> Right, because that was just an error on my part: `time-subtract' does
> >> in fact exhibit the problem. But its alias `subtract-time' doesn't, even
> >> when advised explicitly. I guess advices ignore aliases (i.e. pass
> >> through to the real definition)?
> >
> > Seems to be the opposite: the advice applies only to the alias, so since
> > elp uses the time-subtract name, advising subtract-time doesn't cause
> > problems.
>
> Indeed, thanks :-D
>
> I wonder what the best way forward is here. (info "(elisp) Profiling")
> states that elp "is limited to profiling functions written in Lisp, it
> cannot profile Emacs primitives". So given that of the problem-makers
> only `error' is a Lisp function, the simplest solution would be just
> replacing `special-form-p' with `subrp' in `elp-profilable-p', thus
> disallowing instrumenting primitives altogether.

That seems a bit too drastic. Some primitives are long-running (e.g.
call-process), and instrumenting them is generally useful and also
supported in practice.

>
> If we want to preserve the partial support for primitives, do we want to
> support as much as possible, e.g. by runtime-checking if
> `elp--make-wrapper' is compiled and determine the set of problem-makers
> dynamically, or do we just update the static `elp-not-profilable' list
> conservatively (i.e., including _all_ functions called from the
> wrappers, to make sure they don't cause problems even when
> `elp--make-wrapper' is run interpreted)?

I think the latter makes the most sense. Probably it would also make
sense to exclude primitives and other functions that are so fast that
instrumenting them never makes sense (car, consp, etc.).





      parent reply	other threads:[~2021-11-12 19:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-30 21:25 bug#40335: 27.0.90; elp-not-profilable not up to date Philipp Stephani
2020-04-13 14:52 ` Štěpán Němec
2020-04-13 15:05   ` Noam Postavsky
2020-04-13 15:31     ` Štěpán Němec
2020-04-13 16:05       ` Noam Postavsky
2020-04-13 16:55         ` Štěpán Němec
2021-09-18 16:44           ` Lars Ingebrigtsen
2021-10-18  8:40             ` Lars Ingebrigtsen
2021-11-12 19:56           ` Philipp Stephani [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAArVCkQEW4RupKPuUFKShJw_DmcbuYQKtavNrvUrP=LGWdUhuA@mail.gmail.com' \
    --to=p.stephani2@gmail.com \
    --cc=40335@debbugs.gnu.org \
    --cc=npostavs@gmail.com \
    --cc=stepnem@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).