• Srinivasa Ds's avatar
    [PATCH] kprobes: list all active probes in the system · 346fd59b
    Srinivasa Ds authored
    This patch lists all active probes in the system by scanning through
    kprobe_table[].  It takes care of aggregate handlers and prints the type of
    the probe.  Letter "k" for kprobes, "j" for jprobes, "r" for kretprobes.
    It also lists address of the instruction,its symbolic name(function name +
    offset) and the module name.  One can access this file through
    /sys/kernel/debug/kprobes/list.
    
    Output looks like this
    =====================
    llm40:~/a # cat /sys/kernel/debug/kprobes/list
    c0169ae3  r  sys_read+0x0
    c0169ae3  k  sys_read+0x0
    c01694c8  k  vfs_write+0x0
    c0167d20  r  sys_open+0x0
    f8e658a6  k  reiserfs_delete_inode+0x0  reiserfs
    c0120f4a  k  do_fork+0x0
    c0120f4a  j  do_fork+0x0
    c0169b4a  r  sys_write+0x0
    c0169b4a  k  sys_write+0x0
    c0169622  r  vfs_read+0x0
    =================================
    
    [akpm@linux-foundation.org: cleanup]
    [ananth@in.ibm.com: sparc build fix]
    Signed-off-by: default avatarSrinivasa DS <srinivasa@in.ibm.com>
    Cc: Prasanna S Panchamukhi <prasanna@in.ibm.com>
    Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
    Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
    Signed-off-by: default avatarAnanth N Mavinakayanahalli <ananth@in.ibm.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    346fd59b
kprobes.c 23.4 KB