• Masami Hiramatsu's avatar
    perf probe: Support glob wildcards for function name · 4c859351
    Masami Hiramatsu authored
    Support glob wildcards for function name when adding new probes. This
    will allow us to build caches of function-entry level information with
    $params.
    
    e.g.
      ----
      # perf probe --no-inlines --add 'kmalloc* $params'
      Added new events:
        probe:kmalloc_slab   (on kmalloc* with $params)
        probe:kmalloc_large_node (on kmalloc* with $params)
        probe:kmalloc_order_trace (on kmalloc* with $params)
    
      You can now use it in all perf tools, such as:
    
            perf record -e probe:kmalloc_order_trace -aR sleep 1
    
      # perf probe --list
        probe:kmalloc_large_node (on kmalloc_large_node@mm/slub.c with size flags node)
        probe:kmalloc_order_trace (on kmalloc_order_trace@mm/slub.c with size flags order)
        probe:kmalloc_slab   (on kmalloc_slab@mm/slab_common.c with size flags)
      ----
    Signed-off-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
    Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
    Cc: David Ahern <dsahern@gmail.com>
    Cc: Hemant Kumar <hemant@linux.vnet.ibm.com>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Link: http://lkml.kernel.org/r/20150508010335.24812.19972.stgit@localhost.localdomainSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    4c859351
util.h 8.11 KB