As what the usage showing, we can input a event_glob as an argument to list
all symbols. But it does not work well right now.

Example:
        # perf list kvmmmu

        List of pre-defined events (to be used in -e):

This patch make it work well as follows.

Verification:
        # perf list kvmmmu

        List of pre-defined events (to be used in -e):
          kvmmmu:kvm_mmu_pagetable_walk                      [Tracepoint event]
          kvmmmu:kvm_mmu_paging_element                      [Tracepoint event]
          kvmmmu:kvm_mmu_set_accessed_bit                    [Tracepoint event]
          kvmmmu:kvm_mmu_set_dirty_bit                       [Tracepoint event]
          kvmmmu:kvm_mmu_walker_error                        [Tracepoint event]
          kvmmmu:kvm_mmu_get_page                            [Tracepoint event]
          kvmmmu:kvm_mmu_sync_page                           [Tracepoint event]
          kvmmmu:kvm_mmu_unsync_page                         [Tracepoint event]
          kvmmmu:kvm_mmu_prepare_zap_page                    [Tracepoint event]
          kvmmmu:mark_mmio_spte                              [Tracepoint event]
          kvmmmu:handle_mmio_page_fault                      [Tracepoint event]
          kvmmmu:fast_page_fault                             [Tracepoint event]

Signed-off-by: Dongsheng Yang <yangds.f...@cn.fujitsu.com>
---
 tools/perf/util/parse-events.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 094c28b..d887ea4 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -1236,6 +1236,8 @@ void print_events(const char *event_glob, bool name_only)
 
        print_pmu_events(event_glob, name_only);
 
+       print_tracepoint_events(event_glob, NULL, name_only);
+
        if (event_glob != NULL)
                return;
 
@@ -1254,8 +1256,6 @@ void print_events(const char *event_glob, bool name_only)
                        event_type_descriptors[PERF_TYPE_BREAKPOINT]);
                printf("\n");
        }
-
-       print_tracepoint_events(NULL, NULL, name_only);
 }
 
 int parse_events__is_hardcoded_term(struct parse_events_term *term)
-- 
1.8.2.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to