Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 182332
b: refs/heads/master
c: 41bdcb2
h: refs/heads/master
v: v3
  • Loading branch information
Liming Wang authored and Ingo Molnar committed Dec 30, 2009
1 parent 962b30b commit 1e97a8a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9967411e5b324a908e344d6ce66b77bd5d372c3e
refs/heads/master: 41bdcb23dab22bf27361c5f2d89fe895d8904915
19 changes: 10 additions & 9 deletions trunk/tools/perf/util/parse-events.c
Original file line number Diff line number Diff line change
Expand Up @@ -835,11 +835,12 @@ int parse_filter(const struct option *opt __used, const char *str,
}

static const char * const event_type_descriptors[] = {
"",
"Hardware event",
"Software event",
"Tracepoint event",
"Hardware cache event",
"Raw hardware event descriptor",
"Hardware breakpoint",
};

/*
Expand Down Expand Up @@ -872,7 +873,7 @@ static void print_tracepoint_events(void)
snprintf(evt_path, MAXPATHLEN, "%s:%s",
sys_dirent.d_name, evt_dirent.d_name);
printf(" %-42s [%s]\n", evt_path,
event_type_descriptors[PERF_TYPE_TRACEPOINT+1]);
event_type_descriptors[PERF_TYPE_TRACEPOINT]);
}
closedir(evt_dir);
}
Expand All @@ -892,9 +893,7 @@ void print_events(void)
printf("List of pre-defined events (to be used in -e):\n");

for (i = 0; i < ARRAY_SIZE(event_symbols); i++, syms++) {
type = syms->type + 1;
if (type >= ARRAY_SIZE(event_type_descriptors))
type = 0;
type = syms->type;

if (type != prev_type)
printf("\n");
Expand All @@ -919,17 +918,19 @@ void print_events(void)
for (i = 0; i < PERF_COUNT_HW_CACHE_RESULT_MAX; i++) {
printf(" %-42s [%s]\n",
event_cache_name(type, op, i),
event_type_descriptors[4]);
event_type_descriptors[PERF_TYPE_HW_CACHE]);
}
}
}

printf("\n");
printf(" %-42s [raw hardware event descriptor]\n",
"rNNN");
printf(" %-42s [%s]\n",
"rNNN", event_type_descriptors[PERF_TYPE_RAW]);
printf("\n");

printf(" %-42s [hardware breakpoint]\n", "mem:<addr>[:access]");
printf(" %-42s [%s]\n",
"mem:<addr>[:access]",
event_type_descriptors[PERF_TYPE_BREAKPOINT]);
printf("\n");

print_tracepoint_events();
Expand Down

0 comments on commit 1e97a8a

Please sign in to comment.