Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753734Ab2BPRtZ (ORCPT ); Thu, 16 Feb 2012 12:49:25 -0500 Received: from mail-we0-f174.google.com ([74.125.82.174]:33375 "EHLO mail-we0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751133Ab2BPRtV convert rfc822-to-8bit (ORCPT ); Thu, 16 Feb 2012 12:49:21 -0500 MIME-Version: 1.0 In-Reply-To: <1329376076.7658.4.camel@joe2Laptop> References: <1329369296-4255-1-git-send-email-yinghai@kernel.org> <1329369296-4255-5-git-send-email-yinghai@kernel.org> <1329369930.5082.4.camel@joe2Laptop> <1329371019.5082.9.camel@joe2Laptop> <1329376076.7658.4.camel@joe2Laptop> From: Bjorn Helgaas Date: Thu, 16 Feb 2012 09:49:00 -0800 Message-ID: Subject: Re: [PATCH 4/4] PCI: quirk print dev name with duration To: Joe Perches Cc: Yinghai Lu , Jesse Barnes , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Arjan van de Ven Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT X-System-Of-Record: true Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2569 Lines: 58 On Wed, Feb 15, 2012 at 11:07 PM, Joe Perches 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 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/