bug-gnu-emacs
[Top][All Lists]
Advanced

[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: Vasilij Schneidermann
Subject: bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stopping
Date: Tue, 8 Dec 2015 17:32:08 +0100
User-agent: Mutt/1.5.24 (2015-08-30)

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]