aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/perf_counter/builtin-stat.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2009-06-06 06:24:17 -0400
committerIngo Molnar <mingo@elte.hu>2009-06-06 08:16:49 -0400
commit86847b62f0781ccc97a79936c9ed9dc818cff67b (patch)
treea55a8ea4a3e2c771322edc7aa01b1572c3a59c06 /Documentation/perf_counter/builtin-stat.c
parent8326f44da090d6d304d29b9fdc7fb3e20889e329 (diff)
perf_counter tools: Add 'perf list' to list available events
perf list: List all the available event types which can be used in -e (--event) options. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'Documentation/perf_counter/builtin-stat.c')
-rw-r--r--Documentation/perf_counter/builtin-stat.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/Documentation/perf_counter/builtin-stat.c b/Documentation/perf_counter/builtin-stat.c
index 9711e5524233..2cbf5a189589 100644
--- a/Documentation/perf_counter/builtin-stat.c
+++ b/Documentation/perf_counter/builtin-stat.c
@@ -293,18 +293,17 @@ static const char * const stat_usage[] = {
293 NULL 293 NULL
294}; 294};
295 295
296static char events_help_msg[EVENTS_HELP_MAX];
297
298static const struct option options[] = { 296static const struct option options[] = {
299 OPT_CALLBACK('e', "event", NULL, "event", 297 OPT_CALLBACK('e', "event", NULL, "event",
300 events_help_msg, parse_events), 298 "event selector. use 'perf list' to list available events",
299 parse_events),
301 OPT_BOOLEAN('i', "inherit", &inherit, 300 OPT_BOOLEAN('i', "inherit", &inherit,
302 "child tasks inherit counters"), 301 "child tasks inherit counters"),
303 OPT_INTEGER('p', "pid", &target_pid, 302 OPT_INTEGER('p', "pid", &target_pid,
304 "stat events on existing pid"), 303 "stat events on existing pid"),
305 OPT_BOOLEAN('a', "all-cpus", &system_wide, 304 OPT_BOOLEAN('a', "all-cpus", &system_wide,
306 "system-wide collection from all CPUs"), 305 "system-wide collection from all CPUs"),
307 OPT_BOOLEAN('l', "scale", &scale, 306 OPT_BOOLEAN('S', "scale", &scale,
308 "scale/normalize counters"), 307 "scale/normalize counters"),
309 OPT_END() 308 OPT_END()
310}; 309};
@@ -313,8 +312,6 @@ int cmd_stat(int argc, const char **argv, const char *prefix)
313{ 312{
314 page_size = sysconf(_SC_PAGE_SIZE); 313 page_size = sysconf(_SC_PAGE_SIZE);
315 314
316 create_events_help(events_help_msg);
317
318 memcpy(attrs, default_attrs, sizeof(attrs)); 315 memcpy(attrs, default_attrs, sizeof(attrs));
319 316
320 argc = parse_options(argc, argv, options, stat_usage, 0); 317 argc = parse_options(argc, argv, options, stat_usage, 0);