public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Todd Poynor <toddpoynor@google.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	android-kernel <android-kernel@google.com>,
	Todd E Brandt <todd.e.brandt@linux.intel.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Subject: Re: [PATCH] initcall_debug: add deferred probe times
Date: Thu, 3 Aug 2017 17:47:12 -0700	[thread overview]
Message-ID: <20170804004712.GA26520@kroah.com> (raw)
In-Reply-To: <CAAW3YpZLLjSFcw3Gpy2H70udODsohzLUtHMqn0XSk9b4rYY1Xg@mail.gmail.com>

On Tue, Jul 25, 2017 at 08:01:49PM -0700, Todd Poynor wrote:
> On Tue, Jul 25, 2017 at 4:40 PM, Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> > On Tue, Jul 25, 2017 at 04:31:59PM -0700, Todd Poynor wrote:
> >> initcall_debug attributes all deferred device probe retries for the
> >> late_initcall level to function deferred_probe_initcall.  Add logs of
> >> the individual device probe routines called, to identify which drivers
> >> are executing for how long during the initcall path.  Deferred probes
> >> that occur after initcall processing are not shown.
> >>
> >> Example log messages added:
> >>
> >> [    0.505119] deferred probe my-sound-device @ 6
> >> [    0.517656] deferred probe my-sound-device returned after 1227 usecs
> >
> > Can't you subtract the timestamp number right there?
> 
> This patch extends the existing initcall_debug functionality; I've
> copied the methods used by do_one_initcall_debug() to compute and
> report timing info in a compatible format.  If it's better to change
> the way this is reported, I can also suggest changes to the existing
> initcall_debug code.  cc'ed the maintainers (I should have in the
> first place).

Ah, ok, I missed that, I was looking at the driver probe debug path,
this makes a lot more sense then.

> > And doesn't the tools/power/pm-graph/ scripts do this type of thing
> > automatically for you to give you pretty graphs you can use to drill
> > down on what is taking how long and such?
> 
> analyze_boot.py parses the dmesg output printed by initcall_debug to
> produce those graphs (and can also produce ftrace-based function
> callgraphs).  The initcall_debug output printed (and graphed) for
> deferred probe calls are lumped into a single entry
> "deferred_probe_initcall".  This patch logs the times of the
> individual deferred probe calls by device name, to better help
> developers understand where the time is spent.  If this feature finds
> favor, it may also be deemed useful to update analyze_boot.py to graph
> this information.

I think updating it would be good, but for now this should be fine.
Thanks for the information.

greg k-h

      reply	other threads:[~2017-08-04  0:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-25 23:31 [PATCH] initcall_debug: add deferred probe times Todd Poynor
2017-07-25 23:40 ` Greg Kroah-Hartman
2017-07-26  3:01   ` Todd Poynor
2017-08-04  0:47     ` Greg Kroah-Hartman [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

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

  git send-email \
    --in-reply-to=20170804004712.GA26520@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=android-kernel@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=todd.e.brandt@linux.intel.com \
    --cc=toddpoynor@google.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox