Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 175417
b: refs/heads/master
c: 278498d
h: refs/heads/master
i:
  175415: 50e84a2
v: v3
  • Loading branch information
Masami Hiramatsu authored and Ingo Molnar committed Dec 9, 2009
1 parent 1bd731c commit 1ed075f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 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: 6ab8886326a1b9a3a8d164d8174e3c20703a03a2
refs/heads/master: 278498d438781426d8f315b65f7bca023a26fcc0
27 changes: 25 additions & 2 deletions trunk/tools/perf/util/probe-event.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,11 +379,29 @@ static void clear_probe_point(struct probe_point *pp)
memset(pp, 0, sizeof(pp));
}

/* Show an event */
static void show_perf_probe_event(const char *group, const char *event,
const char *place, struct probe_point *pp)
{
int i;
char buf[128];

e_snprintf(buf, 128, "%s:%s", group, event);
printf(" %-40s (on %s", buf, place);

if (pp->nr_args > 0) {
printf(" with");
for (i = 0; i < pp->nr_args; i++)
printf(" %s", pp->args[i]);
}
printf(")\n");
}

/* List up current perf-probe events */
void show_perf_probe_events(void)
{
unsigned int i;
int fd;
int fd, nr;
char *group, *event;
struct probe_point pp;
struct strlist *rawlist;
Expand All @@ -396,8 +414,13 @@ void show_perf_probe_events(void)
for (i = 0; i < strlist__nr_entries(rawlist); i++) {
ent = strlist__entry(rawlist, i);
parse_trace_kprobe_event(ent->s, &group, &event, &pp);
/* Synthesize only event probe point */
nr = pp.nr_args;
pp.nr_args = 0;
synthesize_perf_probe_event(&pp);
printf("[%s:%s]\t%s\n", group, event, pp.probes[0]);
pp.nr_args = nr;
/* Show an event */
show_perf_probe_event(group, event, pp.probes[0], &pp);
free(group);
free(event);
clear_probe_point(&pp);
Expand Down

0 comments on commit 1ed075f

Please sign in to comment.