all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Vasilij Schneidermann <v.schneidermann@gmail.com>
Cc: 22114@debbugs.gnu.org
Subject: bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stopping
Date: Tue, 08 Dec 2015 19:28:53 +0200	[thread overview]
Message-ID: <837fkodf3e.fsf@gnu.org> (raw)
In-Reply-To: <20151208163208.GA1080@odonien.bevuta.com>

> Date: Tue, 8 Dec 2015 17:32:08 +0100
> From: Vasilij Schneidermann <v.schneidermann@gmail.com>
> Cc: 22114@debbugs.gnu.org
> 
> > Thanks.  But I don't see why we would need to keep a copy of the
> > profile around (and it looks weird to do that anyway, when we have a
> > function that reports it).  When profiler-cpu-log is called, it
> > returns the profile before it resets it, so the data is available and
> > should simply be used.
> > 
> > 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?
> 
> This works only once.  If the profiler has been stopped and you retrieve
> the log, it resets and subsequent access will yield an error.

But why would you need a subsequent access to the same data?  The
profiler report is in the buffer, and you can review it whenever you
want.  The buffer has the time of the report creation as part of its
name, so the next report will not destroy the buffer.  You can also
save the report to a file (there's a separate command to do that).  By
contrast,producing a report again from the same data will simply
produce an identical report.

I guess I don't see a use case where the user would need to produce
the same report twice.  I never needed that myself, FWIW.

> While your variant may be simpler, it is less user-friendly as
> viewing the report a second time will yield an incomprehensible
> error.

If the error message needs improvement, we could do that as well.

> Avoiding this either requires fixing the function retrieving the log
> (which is at the C level and out of my reach) or using a workaround
> like the two extra variables in my patch.

The code implemented in C resets the data deliberately (there are
comments there that explain why), so it cannot be fixed.





  reply	other threads:[~2015-12-08 17:28 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-08  8:13 bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stopping Vasilij Schneidermann
2015-12-08 16:22 ` Eli Zaretskii
2015-12-08 16:32   ` Vasilij Schneidermann
2015-12-08 17:28     ` Eli Zaretskii [this message]
2015-12-08 17:42       ` John Wiegley
2015-12-08 17:56         ` Vasilij Schneidermann
2015-12-08 18:02           ` John Wiegley
2015-12-08 18:12             ` Vasilij Schneidermann
2015-12-08 18:08         ` Eli Zaretskii
2015-12-08 18:14           ` John Wiegley
2015-12-10  9:18           ` Vasilij Schneidermann
2015-12-13 20:33           ` Vasilij Schneidermann
2015-12-13 22:18             ` Vasilij Schneidermann
2015-12-14  4:21               ` Stefan Monnier
2015-12-14  8:28                 ` Vasilij Schneidermann
2015-12-14 14:43                   ` Stefan Monnier
2015-12-14 18:23                     ` Vasilij Schneidermann
2015-12-15  4:29                       ` Stefan Monnier
2019-06-27 18:18                   ` Lars Ingebrigtsen
2019-06-30  9:21                     ` Vasilij Schneidermann
2019-06-30 12:34                       ` Basil L. Contovounesios
2015-12-08 16:40   ` Vasilij Schneidermann
2015-12-08 17:38     ` Eli Zaretskii
2015-12-08 17:44       ` Vasilij Schneidermann
2015-12-08 18:10         ` Eli Zaretskii
2015-12-08 19:15   ` Vasilij Schneidermann
2015-12-08 19:21     ` John Wiegley
2015-12-08 20:12       ` Eli Zaretskii
2015-12-08 20:39         ` John Wiegley
2015-12-08 20:10     ` Eli Zaretskii
2019-06-25 14:46   ` Lars Ingebrigtsen
2019-06-27 14:09     ` Eli Zaretskii

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

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

  git send-email \
    --in-reply-to=837fkodf3e.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=22114@debbugs.gnu.org \
    --cc=v.schneidermann@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.