linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bhelgaas@google.com>
To: Joe Perches <joe@perches.com>
Cc: Yinghai Lu <yinghai@kernel.org>,
	Jesse Barnes <jbarnes@virtuousgeek.org>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	Arjan van de Ven <arjan@infradead.org>
Subject: Re: [PATCH 4/4] PCI: quirk print dev name with duration
Date: Thu, 16 Feb 2012 09:49:00 -0800	[thread overview]
Message-ID: <CAErSpo57hL9dFyFDvdEQcLKCPOeCh3MY3UCURvrXKPpA8W3y3A@mail.gmail.com> (raw)
In-Reply-To: <1329376076.7658.4.camel@joe2Laptop>

On Wed, Feb 15, 2012 at 11:07 PM, Joe Perches <joe@perches.com> wrote:
> On Wed, 2012-02-15 at 21:43 -0800, Joe Perches wrote:
>> On Wed, 2012-02-15 at 21:35 -0800, Yinghai Lu wrote:
>> > On Wed, Feb 15, 2012 at 9:25 PM, Joe Perches <joe@perches.com> wrote:
>> > > On Wed, 2012-02-15 at 21:14 -0800, Yinghai Lu wrote:
>> > >> So could find out which device is involved with the calling
>> > > []
>> > >> +++ linux-2.6/drivers/pci/quirks.c
>> > >> @@ -2854,14 +2854,15 @@ static void do_one_fixup_debug(void (*fn
>> > >>       ktime_t calltime, delta, rettime;
>> > >>       unsigned long long duration;
>> > >>
>> > >> -     printk(KERN_DEBUG "calling  %pF @ %i\n", fn, task_pid_nr(current));
>> > >> +     printk(KERN_DEBUG "calling  %pF @ %i for %s\n",
>> > >> +                     fn, task_pid_nr(current), dev_name(&dev->dev));
>> > >
>> > > Might be better to use dev_dbg
>> > >
>> > >        dev_dbg(&dev->dev, "calling %pF @ %i\n", fn, task_pid_nr(current));
>> > >
>> > > []
>> > >
>> > >> -     printk(KERN_DEBUG "pci fixup %pF returned after %lld usecs\n", fn,
>> > >> -             duration);
>> > >> +     printk(KERN_DEBUG "pci fixup %pF returned after %lld usecs for %s\n",
>> > >> +                     fn, duration, dev_name(&dev->dev));
>> > >
>> > >        dev_dbg(&dev->dev, "pci fixup %pF returned after %llu usecs\n",
>> > >                fn, duration);
>> > Not sure if that is going to break Arjan 's tool that analyze the boot time.
>> That depends on the tool code.
> []
>> Do you have a link to the tool?
>
> That tool would be scripts/bootgraph.pl and using
> dev_dbg would break it unless it's adapted to the
> change.  Your change seems fine for now.

Since we're adding new functionality (analyzing quirk durations), I
think it would be fair game to update the tool at the same time so it
could parse the dev_dbg() format.

For things related specifically to a device, we have a pretty good
record of trying to use dev_*() consistently, so I do have a
preference for continuing that.

If you do change, remember that dev_dbg() is different from
printk(KERN_DEBUG) in that printk(KERN_DEBUG) is always compiled-in
and always goes to the dmesg, but dev_dbg() is only compiled in when
DEBUG is defined, so dev_printk(KERN_DEBUG) would be a more direct
replacement for printk(KERN_DEBUG).

Bjorn

  reply	other threads:[~2012-02-16 17:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-16  5:14 [PATCH 1/4] PCI: quirk related clean up Yinghai Lu
2012-02-16  5:14 ` [PATCH 1/4] PCI: Add class support in quirk handling Yinghai Lu
2012-02-16  5:14 ` [PATCH 2/4] PCI: Specify class for quirk entry with PCI_ANY_ID Yinghai Lu
2012-02-16  5:14 ` [PATCH 3/4] PCI: Move out pci reassigndev resource alignment out of quirk Yinghai Lu
2012-02-16  5:14 ` [PATCH 4/4] PCI: quirk print dev name with duration Yinghai Lu
2012-02-16  5:25   ` Joe Perches
2012-02-16  5:35     ` Yinghai Lu
2012-02-16  5:43       ` Joe Perches
2012-02-16  7:07         ` Joe Perches
2012-02-16 17:49           ` Bjorn Helgaas [this message]
2012-02-16 17:54             ` Joe Perches
  -- strict thread matches above, loose matches on Subject: below --
2012-02-16  5:40 [PATCH 0/4] PCI: quirk related clean up Yinghai Lu
2012-02-16  5:40 ` [PATCH 4/4] PCI: quirk print dev name with duration Yinghai Lu
2012-02-24 22:39   ` Jesse Barnes

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=CAErSpo57hL9dFyFDvdEQcLKCPOeCh3MY3UCURvrXKPpA8W3y3A@mail.gmail.com \
    --to=bhelgaas@google.com \
    --cc=arjan@infradead.org \
    --cc=jbarnes@virtuousgeek.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=yinghai@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).