public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dominik Brodowski <linux@dominikbrodowski.net>
To: Jason Baron <jbaron@redhat.com>
Cc: Greg KH <greg@kroah.com>,
	linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	joe@perches.com, nick@nick-andrew.net, randy.dunlap@oracle.com
Subject: Re: [PATCH 6/7] dynamic debug v2 - convert cpufreq
Date: Fri, 18 Jul 2008 00:20:24 +0200	[thread overview]
Message-ID: <20080717222024.GA21960@isilmar.linta.de> (raw)
In-Reply-To: <20080717214651.GC13252@redhat.com>

On Thu, Jul 17, 2008 at 05:46:51PM -0400, Jason Baron wrote:
> Then why not just put the
> > _cpufreq.h stuff in the current cpufreq.h file(s)?
> > 
> 
> 1) cpufreq.h is included by other subsystems, and thus those other subsystems
> potentially have the wrong debugging information.

...

> If we could pull the subsystem specific header in dynamic_printk.h for each 
> subsytem that would do the trick and be really clean, but i'm not sure of an
> easy way to do that...

<within all cpufreq drivers>
#define DYNAMIC_DEBUG_CPU_FREQ 1

<dynamic_printk.h>
#ifdef DYNAMIC_DEBUG_CPU_FREQ
#define DYNAMIC_DEBUG_NUM_FLAGS "3"
...
#else
...
...
#endif


or -- even better -- could we determine the definition of
DYNAMIC_DEBUG_CPU_FREQ on the fly? It needs to be set to true for exactly all
"modules" which contain a call to cpufreq_debug_printk()...

> 2) For the case where CONFIG_CPU_FREQ_DEBUG is set and 
> CONFIG_DYNAMIC_PRINTK_DEBUG is not set i need to be able get the proper
> definition of 'dynamic_dbg_enabled()' out of dynamic_print.h (included by
> kernel.h). This proper definition is obtained by setting 'DEBUG', and
> thus i need to define this before the kernel.h include. 
> 
> We can solve #2 by defining an explicit definition for dynamic_dbg_enabled() 
> when only CONFIG_CPU_FREQ_DEBUG within cpufreq.h. roughly:
> 
> #ifdef CONFIG_CPU_FREQ_DEBUG
> #define cpufreq_debug_printk(flag) 
> 	if (cpufreq_debug & flag)
> 		 __cpufreq_debug_printk()
> 
> However, the way i have it now I don't need two definitions for 
> cpufreq_debug_printk....

Not that much of a nuiseance, IMO. Or SELECT CONFIG_DYNAMIC_PRINTK_DEBUG
when CONFIG_CPU_FREQ_DEBUG is enabled (if davej agrees ;) )

Best,
	Dominik

  reply	other threads:[~2008-07-17 22:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-15 21:36 [PATCH 6/7] dynamic debug v2 - convert cpufreq Jason Baron
2008-07-15 23:07 ` Dominik Brodowski
2008-07-17 21:05   ` Jason Baron
2008-07-17 21:15     ` Greg KH
2008-07-17 21:46       ` Jason Baron
2008-07-17 22:20         ` Dominik Brodowski [this message]
2008-07-17 21:27     ` Dominik Brodowski

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=20080717222024.GA21960@isilmar.linta.de \
    --to=linux@dominikbrodowski.net \
    --cc=akpm@linux-foundation.org \
    --cc=greg@kroah.com \
    --cc=jbaron@redhat.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nick@nick-andrew.net \
    --cc=randy.dunlap@oracle.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