perf evlist: New command to list the names of events present in a perf.data file
Commit-ID: 43adec955edd116c3e98c6e2f85fbd63281f5221 Gitweb: http://git.kernel.org/tip/43adec955edd116c3e98c6e2f85fbd63281f5221 Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Tue, 15 Mar 2011 11:04:13 -0300 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Tue, 15 Mar 2011 11:10:48 -0300
perf evlist: New command to list the names of events present in a perf.data file
[root@emilia ~]# perf record -a -e sched:* -e timer:timer* sleep 5 [ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.172 MB perf.data (~7530 samples) ] [root@emilia ~]# perf evlist
sched:sched_kthread_stop
sched:sched_kthread_stop_ret
sched:sched_wakeup
sched:sched_wakeup_new
sched:sched_switch
sched:sched_migrate_task
sched:sched_process_free
sched:sched_process_exit
sched:sched_wait_task
sched:sched_process_wait
sched:sched_process_fork
sched:sched_stat_wait
sched:sched_stat_sleep
sched:sched_stat_iowait
sched:sched_stat_runtime
sched:sched_pi_setprio
timer:timer_init
timer:timer_start
timer:timer_expire_entry
timer:timer_expire_exit
timer:timer_cancel
[root@emilia ~]#
Cc: Frederic Weisbecker <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: Tom Zanussi <[email protected]>
LKML-Reference: <new-submission>
--- tools/perf/Documentation/perf-evlist.txt | 26 ++++++++++++++ tools/perf/Makefile | 1 + tools/perf/builtin-evlist.c | 54 ++++++++++++++++++++++++++++++ tools/perf/builtin.h | 1 + tools/perf/command-list.txt | 1 + tools/perf/perf.c | 1 + 6 files changed, 84 insertions(+), 0 deletions(-)
tools/perf/Documentation/perf-evlist.txt new file +26 -0
@@ -0,0 +1,26 @@ +perf-evlist(1) +============== + +NAME +---- +perf-evlist - List the event names in a perf.data file + +SYNOPSIS +-------- +[verse] +'perf evlist <options>' + +DESCRIPTION +----------- +This command displays the names of events sampled in a perf.data file. + +OPTIONS +------- +-i:: +--input=:: + Input file name. (default: perf.data) + +SEE ALSO +-------- +linkperf:perf-record[1], linkperf:perf-list[1], +linkperf:perf-report[1]
tools/perf/Makefile +1 -0
@@ -338,6 +338,7 @@ endif BUILTIN_OBJS += $(OUTPUT)bench/mem-memcpy.o BUILTIN_OBJS += $(OUTPUT)builtin-diff.o +BUILTIN_OBJS += $(OUTPUT)builtin-evlist.o BUILTIN_OBJS += $(OUTPUT)builtin-help.o BUILTIN_OBJS += $(OUTPUT)builtin-sched.o BUILTIN_OBJS += $(OUTPUT)builtin-buildid-list.o
tools/perf/builtin-evlist.c new file +54 -0
54 lines not on this page · raw message
tools/perf/builtin.h +1 -0
@@ -19,6 +19,7 @@ extern int cmd_bench(int argc, const char **argv, const char *prefix);extern int cmd_buildid_cache (int argc,const char **argv,const char *prefix);extern int cmd_buildid_list (int argc,const char **argv,const char *prefix);extern int cmd_diff (int argc,const char **argv,const char *prefix); +extern int cmd_evlist (int argc,const char **argv,const char *prefix);extern int cmd_help (int argc,const char **argv,const char *prefix);extern int cmd_sched (int argc,const char **argv,const char *prefix);extern int cmd_list (int argc,const char **argv,const char *prefix);
tools/perf/command-list.txt +1 -0
@@ -8,6 +8,7 @@ perf-bench mainporcelain common perf-buildid-cache mainporcelain common perf-buildid-list mainporcelain common perf-diff mainporcelain common +perf-evlist mainporcelain common perf-inject mainporcelain common perf-list mainporcelain common perf-sched mainporcelain common
tools/perf/perf.c +1 -0
@@ -313,6 +313,7 @@ static void handle_internal_command(int argc, const char **argv) { "buildid-cache", cmd_buildid_cache, 0 }, { "buildid-list", cmd_buildid_list, 0 }, { "diff", cmd_diff, 0 }, + { "evlist", cmd_evlist, 0 }, { "help", cmd_help, 0 }, { "list", cmd_list, 0 }, { "record", cmd_record, 0 },