• Roland McGrath's avatar
    This adds the utrace facility, a new modular interface in the kernel for · be6978b9
    Roland McGrath authored
    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. 
    If ptrace is attached to a thread, the attach calls in the utrace kernel
    API return -EBUSY.  If utrace is attached to a thread, the PTRACE_ATTACH
    or PTRACE_TRACEME request will return EBUSY to userland.  The old ptrace
    code is otherwise unchanged and nothing using ptrace should be affected by
    this patch as long as utrace is not used at the same time.  In the future
    we can clean up the ptrace implementation and rework it to use the utrace
    API.
    
    [oleg@redhat.com: kill exclude_xtrace logic]
    Signed-off-by: default avatarRoland McGrath <roland@redhat.com>
    Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    be6978b9
Makefile 4.79 KB