• Arnaldo Carvalho de Melo's avatar
    perf list: Do event name substring search as last resort when no events found · dbc67409
    Arnaldo Carvalho de Melo authored
    Before:
    
      # perf list _alloc_ | head -10
      #
    
    After:
    
      # perf list _alloc_ | head -10
        ext4:ext4_alloc_da_blocks                          [Tracepoint event]
        ext4:ext4_get_implied_cluster_alloc_exit           [Tracepoint event]
        kmem:kmem_cache_alloc_node                         [Tracepoint event]
        kmem:mm_page_alloc_extfrag                         [Tracepoint event]
        kmem:mm_page_alloc_zone_locked                     [Tracepoint event]
        xen:xen_mmu_alloc_ptpage                           [Tracepoint event]
      #
    
    And it works for all types of events:
    
      # perf list br
    
      List of pre-defined events (to be used in -e):
    
        branch-instructions OR branches                    [Hardware event]
        branch-misses                                      [Hardware event]
    
        branch-load-misses                                 [Hardware cache event]
        branch-loads                                       [Hardware cache event]
    
        branch-instructions OR cpu/branch-instructions/    [Kernel PMU event]
        branch-misses OR cpu/branch-misses/                [Kernel PMU event]
    
        filelock:break_lease_block                         [Tracepoint event]
        filelock:break_lease_noblock                       [Tracepoint event]
        filelock:break_lease_unblock                       [Tracepoint event]
        syscalls:sys_enter_brk                             [Tracepoint event]
        syscalls:sys_exit_brk                              [Tracepoint event]
    
      #
    Suggested-by: default avatarIngo Molnar <mingo@kernel.org>
    Cc: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Borislav Petkov <bp@suse.de>
    Cc: David Ahern <dsahern@gmail.com>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Stephane Eranian <eranian@google.com>
    Cc: Wang Nan <wangnan0@huawei.com>
    Link: http://lkml.kernel.org/n/tip-qieivl18jdemoaghgndj36e6@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    dbc67409
perf-list.txt 4.88 KB