[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stop
From: |
Eli Zaretskii |
Subject: |
bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stopping |
Date: |
Thu, 27 Jun 2019 17:09:02 +0300 |
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: Vasilij Schneidermann <v.schneidermann@gmail.com>, 22114@debbugs.gnu.org
> Date: Tue, 25 Jun 2019 16:46:47 +0200
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > I don't really understand why profiler.el insists on having the
> > profiler running for providing the profile. The much simpler patch
> > below makes it possible for me to invoke profiler-report whether a
> > profile is running or not. Does it work for you? If not, can you
> > tell what I missed?
> >
> > --- lisp/profiler.el~4 2015-11-11 07:57:32.000000000 +0200
> > +++ lisp/profiler.el 2015-12-08 17:54:27.380084700 +0200
> > @@ -216,19 +216,17 @@
> >
> > (defun profiler-cpu-profile ()
> > "Return CPU profile."
> > - (when (profiler-running-p 'cpu)
> > - (profiler-make-profile
> > - :type 'cpu
> > - :timestamp (current-time)
> > - :log (profiler-cpu-log))))
> > + (profiler-make-profile
> > + :type 'cpu
> > + :timestamp (current-time)
> > + :log (profiler-cpu-log)))
>
> [etc]
>
> The discussion then turned to other things (like getting in-progress
> reports), but this seems like the simplest solution that solves the
> originally stated problem. But it wasn't applied -- I can do that now,
> if that's convenient...
I think Stefan endorsed the last patch posted there, so maybe that's
what should be pushed.