[yocto] [PATCH 3/3][KERNEL] utrace core

Tom Zanussi tom.zanussi at intel.com
Mon Sep 5 09:05:36 PDT 2011


This adds the utrace facility, a new modular interface in the kernel for
implementing user thread tracing and debugging.  This fits on top of the
tracehook_* layer, so the new code is well-isolated.

The new interface is in <linux/utrace.h> and the DocBook utrace book
describes it.  It allows for multiple separate tracing engines to work in
parallel without interfering with each other.  Higher-level tracing
facilities can be implemented as loadable kernel modules using this layer.

The new facility is made optional under CONFIG_UTRACE.
When this is not enabled, no new code is added.
It can only be enabled on machines that have all the
prerequisites and select CONFIG_HAVE_ARCH_TRACEHOOK.

In this initial version, utrace and ptrace do not play together at all.
The next patch reworks ptrace to use the utrace API.

Signed-off-by: Roland McGrath <roland at redhat.com>
Signed-off-by: Oleg Nesterov <oleg at redhat.com>
Integrated-by: Tom Zanussi <tom.zanussi at intel.com>
---
 Documentation/DocBook/Makefile    |    2 +-
 Documentation/DocBook/utrace.tmpl |  589 +++++++++
 fs/proc/array.c                   |    3 +
 include/linux/sched.h             |    5 +
 include/linux/tracehook.h         |   87 ++-
 include/linux/utrace.h            |  692 +++++++++++
 init/Kconfig                      |    9 +
 kernel/Makefile                   |    1 +
 kernel/fork.c                     |    3 +
 kernel/utrace.c                   | 2440 +++++++++++++++++++++++++++++++++++++
 10 files changed, 3829 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/DocBook/utrace.tmpl
 create mode 100644 include/linux/utrace.h
 create mode 100644 kernel/utrace.c


Patch too large to post here, see git repo.




More information about the yocto mailing list