* [PATCH -rt] show_held_locks cleanup
@ 2006-05-12 17:12 Daniel Walker
2006-05-20 15:50 ` Daniel Walker
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Walker @ 2006-05-12 17:12 UTC (permalink / raw)
To: mingo; +Cc: linux-kernel
- turns show_held_locks into debug_mutex_show_held_locks() .
- Adds debug_mutex_show_held_locks() + rt_mutex_show_held_locks() to x86_64
- cleans up show_held_locks() on arm .
I compile tested i386, arm, not x86_64 . Seems like this should go upstream too.
Signed-Off-By: Daniel Walker <dwalker@mvista.com>
Index: linux-2.6.16/kernel/mutex-debug.c
===================================================================
--- linux-2.6.16.orig/kernel/mutex-debug.c
+++ linux-2.6.16/kernel/mutex-debug.c
@@ -117,7 +117,7 @@ static void show_task_locks(struct task_
* printk all locks held in the system (if filter == NULL),
* or all locks belonging to a single task (if filter != NULL):
*/
-void show_held_locks(struct task_struct *filter)
+void mutex_debug_show_held_locks(struct task_struct *filter)
{
struct list_head *curr, *cursor = NULL;
struct mutex *lock;
@@ -201,7 +201,7 @@ retry:
} while_each_thread(g, p);
printk("\n");
- show_held_locks(NULL);
+ mutex_debug_show_held_locks(NULL);
printk("=============================================\n\n");
if (unlock)
@@ -216,7 +216,7 @@ static void report_deadlock(struct task_
printk_lock(lock, 1);
printk("... trying at: ");
print_symbol("%s\n", ip);
- show_held_locks(current);
+ mutex_debug_show_held_locks(current);
if (lockblk) {
printk("but %s/%d is deadlocking current task %s/%d!\n\n",
@@ -225,7 +225,7 @@ static void report_deadlock(struct task_
task->comm, task->pid);
printk_lock(lockblk, 1);
- show_held_locks(task);
+ mutex_debug_show_held_locks(task);
printk("\n%s/%d's [blocked] stackdump:\n\n",
task->comm, task->pid);
Index: linux-2.6.16/arch/arm/kernel/traps.c
===================================================================
--- linux-2.6.16.orig/arch/arm/kernel/traps.c
+++ linux-2.6.16/arch/arm/kernel/traps.c
@@ -176,9 +176,12 @@ static void dump_backtrace(struct pt_reg
void dump_stack(void)
{
#ifdef CONFIG_DEBUG_ERRORS
+ struct task_struct *task = current;
+
__backtrace();
- print_traces(current);
- show_held_locks(current);
+ print_traces(task);
+ mutex_debug_show_held_locks(task);
+ rt_mutex_show_held_locks(task, 1);
#endif
}
Index: linux-2.6.16/arch/x86_64/kernel/traps.c
===================================================================
--- linux-2.6.16.orig/arch/x86_64/kernel/traps.c
+++ linux-2.6.16/arch/x86_64/kernel/traps.c
@@ -255,6 +255,8 @@ void show_trace(struct task_struct *task
#undef HANDLE_STACK
printk("\n");
print_traces(task);
+ mutex_debug_show_held_locks(task);
+ rt_mutex_show_held_locks(task, 1);
}
void show_stack(struct task_struct *tsk, unsigned long * rsp)
Index: linux-2.6.16/arch/i386/kernel/traps.c
===================================================================
--- linux-2.6.16.orig/arch/i386/kernel/traps.c
+++ linux-2.6.16/arch/i386/kernel/traps.c
@@ -175,6 +175,7 @@ static void show_trace_log_lvl(struct ta
printk(" =======================\n");
}
print_traces(task);
+ mutex_debug_show_held_locks(task);
rt_mutex_show_held_locks(task, 1);
}
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH -rt] show_held_locks cleanup
2006-05-12 17:12 [PATCH -rt] show_held_locks cleanup Daniel Walker
@ 2006-05-20 15:50 ` Daniel Walker
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Walker @ 2006-05-20 15:50 UTC (permalink / raw)
To: mingo; +Cc: linux-kernel
You didn't like this one ?
On Fri, 2006-05-12 at 10:12 -0700, Daniel Walker wrote:
> - turns show_held_locks into debug_mutex_show_held_locks() .
> - Adds debug_mutex_show_held_locks() + rt_mutex_show_held_locks() to x86_64
> - cleans up show_held_locks() on arm .
>
> I compile tested i386, arm, not x86_64 . Seems like this should go upstream too.
>
> Signed-Off-By: Daniel Walker <dwalker@mvista.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-05-20 15:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-12 17:12 [PATCH -rt] show_held_locks cleanup Daniel Walker
2006-05-20 15:50 ` Daniel Walker
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®