Add stack trace dumps for VFS over serial
This commit is contained in:
parent
625f4ae4a3
commit
ea8ff9284a
2 changed files with 15 additions and 0 deletions
|
@ -45,6 +45,8 @@ static int osfxsr_feature; /* FXSAVE/FXRSTOR instructions support (SSEx) */
|
|||
void * k_stacks;
|
||||
|
||||
static void ser_debug(int c);
|
||||
static void ser_dump_vfs(void);
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
static void ser_dump_proc_cpu(void);
|
||||
#endif
|
||||
|
@ -391,6 +393,9 @@ static void ser_debug(const int c)
|
|||
ser_dump_proc_cpu();
|
||||
break;
|
||||
#endif
|
||||
case '5':
|
||||
ser_dump_vfs();
|
||||
break;
|
||||
#if DEBUG_TRACE
|
||||
#define TOGGLECASE(ch, flag) \
|
||||
case ch: { \
|
||||
|
@ -428,6 +433,14 @@ void ser_dump_proc()
|
|||
}
|
||||
}
|
||||
|
||||
static void ser_dump_vfs()
|
||||
{
|
||||
/* Notify VFS it has to generate stack traces. Kernel can't do that as
|
||||
* it's not aware of user space threads.
|
||||
*/
|
||||
mini_notify(proc_addr(KERNEL), VFS_PROC_NR);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
static void ser_dump_proc_cpu(void)
|
||||
{
|
||||
|
|
|
@ -112,6 +112,8 @@ int main(void)
|
|||
/* A task notify()ed us */
|
||||
if (who_e == DS_PROC_NR)
|
||||
handle_work(ds_event);
|
||||
else if (who_e == KERNEL)
|
||||
mthread_stacktraces();
|
||||
else if (fp != NULL && (fp->fp_flags & FP_SRV_PROC))
|
||||
handle_work(do_dev_event);
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue