mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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 <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]>
This commit is contained in:
parent
a5abba989d
commit
9977728840
5 changed files with 28 additions and 4 deletions
|
|
@ -249,14 +249,17 @@ static struct debug_bucket *get_bucket(unsigned long addr)
|
|||
|
||||
static void debug_print_object(struct debug_obj *obj, char *msg)
|
||||
{
|
||||
struct debug_obj_descr *descr = obj->descr;
|
||||
static int limit;
|
||||
|
||||
if (limit < 5 && obj->descr != descr_test) {
|
||||
if (limit < 5 && descr != descr_test) {
|
||||
void *hint = descr->debug_hint ?
|
||||
descr->debug_hint(obj->object) : NULL;
|
||||
limit++;
|
||||
WARN(1, KERN_ERR "ODEBUG: %s %s (active state %u) "
|
||||
"object type: %s\n",
|
||||
"object type: %s hint: %pS\n",
|
||||
msg, obj_states[obj->state], obj->astate,
|
||||
obj->descr->name);
|
||||
descr->name, hint);
|
||||
}
|
||||
debug_objects_warnings++;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue