All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Baron <jbaron@redhat.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Joe Perches <joe@perches.com>,
	linux-wireless@vger.kernel.org, Jim Cromie <jim.cromie@gmail.com>
Subject: Re: [PATCH 4/6] mac80211: clean up debugging
Date: Mon, 25 Jun 2012 17:29:04 -0400	[thread overview]
Message-ID: <20120625212904.GA9245@redhat.com> (raw)
In-Reply-To: <1340530258.4577.4.camel@jlt3.sipsolutions.net>

On Sun, Jun 24, 2012 at 11:30:58AM +0200, Johannes Berg wrote:
> On Sat, 2012-06-23 at 08:40 -0700, Joe Perches wrote:
> 
> > > FWIW, I would definitely prefer named rather than bitmap selectors :-)
> > 
> > (Added Jason and Jim)
> > 
> > Given it's a debug-only facility, I think bitmap
> > selectors sufficient, Maybe adding an external
> > utility to map names to bits would be enough to
> > not need that feature in the kernel.
> 

I've been thinking about that too - given that we can control each
individual statement from userspace, perhaps most of the implementation
for level/bitmap support could and should be done in userspace.

For levels, we add 1 additional field to the pr_debug() statement, and
its easy enough to construct a command-line to turn on the correct
statements.

For flags it should be just as easy but we probably want to export a
table mapping kernel strings to to bitmask fields as well.

So some simple wrapper scripts would probably make this pretty easy. 

> I guess the real question isn't whether it should be a bitmap or a name
> or whatever, it's how it's implemented. To allay fears about runtime
> overhead, I think it would be good to use the jump_label mechanism to
> implement it -- I do realise that still has runtime overhead for the
> argument preparation, but still.
> 
> Looking at the history, it seems that jump labels were at one point used
> by reverted to fix gcc 3.3, I'm sure that could be resolved?

Yes, there were some circular header dependencies issues - but they can
be resolved. I will re-post this work.

> 
> Anyway, the point is that if it uses jump labels then we need some sort
> of house-keeping structures anyway to be able to enable/disable the
> right jump labels. And that could easily have a string attached, which
> would make it easier when working with bug reporters etc. since you
> don't have to worry about the exact bitmap, you can give them a string
> (and if it's wrong, there will be a failure rather than silently getting
> the wrong data)
> 
> johannes
> 

  reply	other threads:[~2012-06-25 21:29 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-22 17:18 [PATCH v2 0/6] mac80211 debugging Johannes Berg
2012-06-22 17:18 ` [PATCH 1/6] mac80211: remove TKIP debug Johannes Berg
2012-06-22 17:18 ` [PATCH 2/6] mac80211: two small verbose debug cleanups Johannes Berg
2012-06-22 17:18 ` [PATCH 3/6] mac80211: pass sdata to some RX functions Johannes Berg
2012-06-22 17:18 ` [PATCH 4/6] mac80211: clean up debugging Johannes Berg
2012-06-23  8:02   ` Joe Perches
2012-06-23 13:04     ` Johannes Berg
2012-06-23 15:40       ` Joe Perches
2012-06-24  9:30         ` Johannes Berg
2012-06-25 21:29           ` Jason Baron [this message]
2012-06-26  5:23             ` Joe Perches
2012-06-23 16:03   ` Joe Perches
2012-06-22 17:18 ` [PATCH 5/6] mac80211: rename driver-trace file Johannes Berg
2012-06-22 17:18 ` [PATCH 6/6] mac80211: trace debug messages Johannes Berg
  -- strict thread matches above, loose matches on Subject: below --
2012-06-22 13:14 mac80211 logging/tracing Johannes Berg
2012-06-22 13:14 ` [PATCH 4/6] mac80211: clean up debugging Johannes Berg
2012-06-22 14:37   ` Joe Perches
2012-06-22 14:37     ` Joe Perches
2012-06-22 14:43     ` Johannes Berg
2012-06-22 14:49       ` Joe Perches

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=20120625212904.GA9245@redhat.com \
    --to=jbaron@redhat.com \
    --cc=jim.cromie@gmail.com \
    --cc=joe@perches.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.