From: Thomas Gleixner <tglx@linutronix.de>
To: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] debugobjects: print more data
Date: Tue, 22 Feb 2011 18:20:46 +0100 (CET) [thread overview]
Message-ID: <alpine.LFD.2.00.1102221627520.2701@localhost6.localdomain6> (raw)
In-Reply-To: <20110222121914.GA27963@redhat.com>
On Tue, 22 Feb 2011, Stanislaw Gruszka wrote:
> On main print function I changed WARN to printk to avoid "cut off" lines
> and keep all informations together.
Sorry for not noticing the problem with this earlier. It makes bug
reporting for Joe user harder than it is now. The WARN based output is
automatically captured by kerneloops and other tools. Your change
prevents it.
And we can be more clever about it.
> struct debug_obj_descr {
> const char *name;
> -
> + void (*print) (void *addr);
So we could change that function to be
void *(debug_hint) (void *addr);
And let it do:
static void *debug_hint(void *addr)
{
return ((struct hrtimer *) addr)->function;
}
The object pointer itself is already known and pretty pointless. There
is really no debug value in the pointer itself.
That would change debug_print_object() to:
void *hint = descr->debug_hint ? descr->debug_hint(obj->object) : NULL;
and make
WARN(1, KERN_ERR "ODEBUG: %s %s (active state %u) object type: %s hint: %pS\n",
msg, obj_states[obj->state], obj->astate,
obj->descr->name, hint);
So we get the valuable additional information w/o losing the ability
of automated bug reports. And I think all we ever want is something
like a callback function, which helps us to identify the object.
Thanks,
tglx
prev parent reply other threads:[~2011-02-22 17:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-22 12:19 Stanislaw Gruszka
2011-02-22 17:20 ` Thomas Gleixner [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=alpine.LFD.2.00.1102221627520.2701@localhost6.localdomain6 \
--to=tglx@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=sgruszka@redhat.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
all inboxes | Powered by JetHome®