debugobjects: Add hint for better object identification
In complex subsystems like mac80211 structures can contain several timers and work structs, so identifying a specific instance from the call trace and object type output of debugobjects can be hard. Allow the subsystems which support debugobjects to provide a hint function. This function returns a pointer to a kernel address (preferrably the objects callback function) which is printed along with the debugobjects type. Add hint methods for timer_list, work_struct and hrtimer. [ tglx: Massaged changelog, made it compile ] Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> LKML-Reference: <20110307085809.GA9334@redhat.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:

zatwierdzone przez
Thomas Gleixner

rodzic
a5abba989d
commit
9977728840
@@ -404,6 +404,11 @@ static void timer_stats_account_timer(struct timer_list *timer) {}
|
||||
|
||||
static struct debug_obj_descr timer_debug_descr;
|
||||
|
||||
static void *timer_debug_hint(void *addr)
|
||||
{
|
||||
return ((struct timer_list *) addr)->function;
|
||||
}
|
||||
|
||||
/*
|
||||
* fixup_init is called when:
|
||||
* - an active object is initialized
|
||||
@@ -477,6 +482,7 @@ static int timer_fixup_free(void *addr, enum debug_obj_state state)
|
||||
|
||||
static struct debug_obj_descr timer_debug_descr = {
|
||||
.name = "timer_list",
|
||||
.debug_hint = timer_debug_hint,
|
||||
.fixup_init = timer_fixup_init,
|
||||
.fixup_activate = timer_fixup_activate,
|
||||
.fixup_free = timer_fixup_free,
|
||||
|
Reference in New Issue
Block a user