Subject: Re: bug#27397: [PATCH] New commands for bulk tracing of elisp functions

From: Dmitry Gutov <[email-masked]>
Date: Mon, 19 Jun 2017 14:27:43 +0300

Hi Michael,

On 6/19/17 12:56 PM, Michael Albinus wrote:
> That's not what I want. Often, I hunt bugs related to the order of
> autoloaded functions, and this order shall be kept also when tracing.

Your case is surely valid, but sounds a bit niche to me. It shouldn't be 
too hard to evaluate this, though:

(with-eval-after-load 'tramp
   (trace-package "tramp-"))

And the current patch makes it easier.

>> Perhaps you're actually be suggesting some kind of `eval-after-load'
>> tracing behaviour, though?
> 
> Yes, that's the idea. If `trace-package' uses as argument a package name
> as proposed above, the instrumentation shall happen in an
> `eval-after-load' form for that package.

Considering elp-instrument-package does not do that, I think we should 
limit the scope of the currently discussed patch, and trace only already 
loaded functions.

If we do what you suggest, it should be a new discussion, and it should 
improve elp-instrument-package as well.