Difference between revisions of "Support dumping user-space stack from kernel"

From eLinux.org
Jump to: navigation, search
(add page)
(No difference)

Revision as of 20:26, 1 October 2013

Summary
Support dumping user-space stack from kernel
Proposer
Tim Bird, Sony Mobile

Description

Currently, a function like dump_stack() (which internally calls dump_backtrace()) is limited to showing the the dump of kernel stack only.

In some situations it would be useful to get the call stack of user level process also, instead of just the kernel's call stack. With this feature, we could determine what user-space activity was responsible for what kernel actions.

It will be nice if this feature could be enabled with a kernel config option.

In conjunction with this, it would be nice to support a system-wide tracing function, which could trace both user-space and kernel space. This would include a simple method in userspace to show the both user-space and kernel-space functions, with arguments and return values.

Other existing systems, such as strace, ltrace and ftrace, show parts of the full sequence of execution, but not all of them. It would be nice to create an easy tool similar to strace, which can focus on the call stack related to the initiator caller. NOT print all. All

     user space call stack, kernel call stack, irq, softirq, tasklet
     occurs during these calls are recorded.

As an example, when running a program called 'prog1', it would be nice to collect:

  • all function/library all from prog1 in user-space,including the arguments for each call and the return values
  • all system calls made by prog1, including arguments and return values
  • all the function calls in kernel-space launched resulting from prog1 (all processes / threads) including what happens during system call, irq, softirq, and tasklets)

Related work

  • LTTng - has a user-space tracer (not the same as monitoring return values)

Scope

Unknown

Contractor Candidates

None yet.

Comments