aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/util/parse-events.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index e5bc0fb016b2..dc585a835cab 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -835,11 +835,12 @@ int parse_filter(const struct option *opt __used, const char *str,
835} 835}
836 836
837static const char * const event_type_descriptors[] = { 837static const char * const event_type_descriptors[] = {
838 "",
839 "Hardware event", 838 "Hardware event",
840 "Software event", 839 "Software event",
841 "Tracepoint event", 840 "Tracepoint event",
842 "Hardware cache event", 841 "Hardware cache event",
842 "Raw hardware event descriptor",
843 "Hardware breakpoint",
843}; 844};
844 845
845/* 846/*
@@ -872,7 +873,7 @@ static void print_tracepoint_events(void)
872 snprintf(evt_path, MAXPATHLEN, "%s:%s", 873 snprintf(evt_path, MAXPATHLEN, "%s:%s",
873 sys_dirent.d_name, evt_dirent.d_name); 874 sys_dirent.d_name, evt_dirent.d_name);
874 printf(" %-42s [%s]\n", evt_path, 875 printf(" %-42s [%s]\n", evt_path,
875 event_type_descriptors[PERF_TYPE_TRACEPOINT+1]); 876 event_type_descriptors[PERF_TYPE_TRACEPOINT]);
876 } 877 }
877 closedir(evt_dir); 878 closedir(evt_dir);
878 } 879 }
@@ -892,9 +893,7 @@ void print_events(void)
892 printf("List of pre-defined events (to be used in -e):\n"); 893 printf("List of pre-defined events (to be used in -e):\n");
893 894
894 for (i = 0; i < ARRAY_SIZE(event_symbols); i++, syms++) { 895 for (i = 0; i < ARRAY_SIZE(event_symbols); i++, syms++) {
895 type = syms->type + 1; 896 type = syms->type;
896 if (type >= ARRAY_SIZE(event_type_descriptors))
897 type = 0;
898 897
899 if (type != prev_type) 898 if (type != prev_type)
900 printf("\n"); 899 printf("\n");
@@ -919,17 +918,19 @@ void print_events(void)
919 for (i = 0; i < PERF_COUNT_HW_CACHE_RESULT_MAX; i++) { 918 for (i = 0; i < PERF_COUNT_HW_CACHE_RESULT_MAX; i++) {
920 printf(" %-42s [%s]\n", 919 printf(" %-42s [%s]\n",
921 event_cache_name(type, op, i), 920 event_cache_name(type, op, i),
922 event_type_descriptors[4]); 921 event_type_descriptors[PERF_TYPE_HW_CACHE]);
923 } 922 }
924 } 923 }
925 } 924 }
926 925
927 printf("\n"); 926 printf("\n");
928 printf(" %-42s [raw hardware event descriptor]\n", 927 printf(" %-42s [%s]\n",
929 "rNNN"); 928 "rNNN", event_type_descriptors[PERF_TYPE_RAW]);
930 printf("\n"); 929 printf("\n");
931 930
932 printf(" %-42s [hardware breakpoint]\n", "mem:<addr>[:access]"); 931 printf(" %-42s [%s]\n",
932 "mem:<addr>[:access]",
933 event_type_descriptors[PERF_TYPE_BREAKPOINT]);
933 printf("\n"); 934 printf("\n");
934 935
935 print_tracepoint_events(); 936 print_tracepoint_events();