diff options
author | Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> | 2010-10-21 06:13:35 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-10-21 14:06:42 -0400 |
commit | fb8c5a56c7ddbc2b0d2ee7a8da60fe1355f75141 (patch) | |
tree | 0d7575627d9fbcdeb642fbcb6ed84744fe9763f5 /tools/perf/util/probe-event.c | |
parent | c82ec0a2bd7725a2d2ac3065d8cde13e1f717d3c (diff) |
perf probe: Show accessible global variables
Add --externs for allowing --vars to show accessible global (externally
defined) variables from a given probe point too.
This will give you a hint which globals can be accessible from the probe point.
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <20101021101335.3542.31003.stgit@ltc236.sdl.hitachi.co.jp>
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/probe-event.c')
-rw-r--r-- | tools/perf/util/probe-event.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index 83192a59f02..82b0976e205 100644 --- a/tools/perf/util/probe-event.c +++ b/tools/perf/util/probe-event.c | |||
@@ -379,7 +379,7 @@ end: | |||
379 | } | 379 | } |
380 | 380 | ||
381 | static int show_available_vars_at(int fd, struct perf_probe_event *pev, | 381 | static int show_available_vars_at(int fd, struct perf_probe_event *pev, |
382 | int max_vls) | 382 | int max_vls, bool externs) |
383 | { | 383 | { |
384 | char *buf; | 384 | char *buf; |
385 | int ret, i; | 385 | int ret, i; |
@@ -391,7 +391,7 @@ static int show_available_vars_at(int fd, struct perf_probe_event *pev, | |||
391 | return -EINVAL; | 391 | return -EINVAL; |
392 | pr_debug("Searching variables at %s\n", buf); | 392 | pr_debug("Searching variables at %s\n", buf); |
393 | 393 | ||
394 | ret = find_available_vars_at(fd, pev, &vls, max_vls); | 394 | ret = find_available_vars_at(fd, pev, &vls, max_vls, externs); |
395 | if (ret > 0) { | 395 | if (ret > 0) { |
396 | /* Some variables were found */ | 396 | /* Some variables were found */ |
397 | fprintf(stdout, "Available variables at %s\n", buf); | 397 | fprintf(stdout, "Available variables at %s\n", buf); |
@@ -421,7 +421,7 @@ static int show_available_vars_at(int fd, struct perf_probe_event *pev, | |||
421 | 421 | ||
422 | /* Show available variables on given probe point */ | 422 | /* Show available variables on given probe point */ |
423 | int show_available_vars(struct perf_probe_event *pevs, int npevs, | 423 | int show_available_vars(struct perf_probe_event *pevs, int npevs, |
424 | int max_vls) | 424 | int max_vls, bool externs) |
425 | { | 425 | { |
426 | int i, fd, ret = 0; | 426 | int i, fd, ret = 0; |
427 | 427 | ||
@@ -438,7 +438,7 @@ int show_available_vars(struct perf_probe_event *pevs, int npevs, | |||
438 | setup_pager(); | 438 | setup_pager(); |
439 | 439 | ||
440 | for (i = 0; i < npevs && ret >= 0; i++) | 440 | for (i = 0; i < npevs && ret >= 0; i++) |
441 | ret = show_available_vars_at(fd, &pevs[i], max_vls); | 441 | ret = show_available_vars_at(fd, &pevs[i], max_vls, externs); |
442 | 442 | ||
443 | close(fd); | 443 | close(fd); |
444 | return ret; | 444 | return ret; |