• Masami Hiramatsu's avatar
    perf probe: Show usage even if the last event is skipped · d350bd57
    Masami Hiramatsu authored
    When the last part of converted events are blacklisted or out-of-text,
    those are skipped and perf probe doesn't show usage examples.  This
    fixes it to show the example even if the last part of event list is
    skipped.
    
    E.g. without this patch, events are added, but suddenly end:
    
      # perf probe vfs_*
      vfs_caches_init_early is out of .text, skip it.
      vfs_caches_init is out of .text, skip it.
      Added new events:
        probe:vfs_fallocate  (on vfs_*)
        probe:vfs_open       (on vfs_*)
      ...
        probe:vfs_dentry_acceptable (on vfs_*)
        probe:vfs_load_quota_inode (on vfs_*)
      #
    
    With this fix:
    
      # perf probe vfs_*
      vfs_caches_init_early is out of .text, skip it.
      vfs_caches_init is out of .text, skip it.
      Added new events:
        probe:vfs_fallocate  (on vfs_*)
      ...
        probe:vfs_load_quota_inode (on vfs_*)
    
      You can now use it in all perf tools, such as:
    
    	perf record -e probe:vfs_load_quota_inode -aR sleep 1
    
    Note that this can be reproduced ONLY IF the vfs_caches_init* is the
    last part of matched symbol list. I've checked this happens on
    "3.19.0-generic #18-Ubuntu" kernel binary.
    Signed-off-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
    Cc: David Ahern <dsahern@gmail.com>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Naohiro Aota <naota@elisp.net>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Link: http://lkml.kernel.org/r/20150616115057.19906.5502.stgit@localhost.localdomainSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    d350bd57
probe-event.c 66.3 KB