Loading Documentation/perf_counter/Makefile +1 −0 Original line number Diff line number Diff line Loading @@ -328,6 +328,7 @@ BUILTIN_OBJS += builtin-record.o BUILTIN_OBJS += builtin-report.o BUILTIN_OBJS += builtin-stat.o BUILTIN_OBJS += builtin-top.o BUILTIN_OBJS += builtin-list.o PERFLIBS = $(LIB_FILE) EXTLIBS = Loading Documentation/perf_counter/builtin-list.c 0 → 100644 +20 −0 Original line number Diff line number Diff line /* * builtin-list.c * * Builtin list command: list all event types * * Copyright (C) 2009, Thomas Gleixner <tglx@linutronix.de> * Copyright (C) 2008-2009, Red Hat Inc, Ingo Molnar <mingo@redhat.com> */ #include "builtin.h" #include "perf.h" #include "util/parse-options.h" #include "util/parse-events.h" int cmd_list(int argc, const char **argv, const char *prefix) { print_events(); return 0; } Documentation/perf_counter/builtin-record.c +2 −5 Original line number Diff line number Diff line Loading @@ -495,11 +495,10 @@ static const char * const record_usage[] = { NULL }; static char events_help_msg[EVENTS_HELP_MAX]; static const struct option options[] = { OPT_CALLBACK('e', "event", NULL, "event", events_help_msg, parse_events), "event selector. use 'perf list' to list available events", parse_events), OPT_INTEGER('p', "pid", &target_pid, "record events on existing pid"), OPT_INTEGER('r', "realtime", &realtime_prio, Loading Loading @@ -527,8 +526,6 @@ int cmd_record(int argc, const char **argv, const char *prefix) { int counter; create_events_help(events_help_msg); argc = parse_options(argc, argv, options, record_usage, 0); if (!argc && target_pid == -1 && !system_wide) usage_with_options(record_usage, options); Loading Documentation/perf_counter/builtin-stat.c +3 −6 Original line number Diff line number Diff line Loading @@ -293,18 +293,17 @@ static const char * const stat_usage[] = { NULL }; static char events_help_msg[EVENTS_HELP_MAX]; static const struct option options[] = { OPT_CALLBACK('e', "event", NULL, "event", events_help_msg, parse_events), "event selector. use 'perf list' to list available events", parse_events), OPT_BOOLEAN('i', "inherit", &inherit, "child tasks inherit counters"), OPT_INTEGER('p', "pid", &target_pid, "stat events on existing pid"), OPT_BOOLEAN('a', "all-cpus", &system_wide, "system-wide collection from all CPUs"), OPT_BOOLEAN('l', "scale", &scale, OPT_BOOLEAN('S', "scale", &scale, "scale/normalize counters"), OPT_END() }; Loading @@ -313,8 +312,6 @@ int cmd_stat(int argc, const char **argv, const char *prefix) { page_size = sysconf(_SC_PAGE_SIZE); create_events_help(events_help_msg); memcpy(attrs, default_attrs, sizeof(attrs)); argc = parse_options(argc, argv, options, stat_usage, 0); Loading Documentation/perf_counter/builtin-top.c +2 −5 Original line number Diff line number Diff line Loading @@ -606,11 +606,10 @@ static const char * const top_usage[] = { NULL }; static char events_help_msg[EVENTS_HELP_MAX]; static const struct option options[] = { OPT_CALLBACK('e', "event", NULL, "event", events_help_msg, parse_events), "event selector. use 'perf list' to list available events", parse_events), OPT_INTEGER('c', "count", &default_interval, "event period to sample"), OPT_INTEGER('p', "pid", &target_pid, Loading Loading @@ -648,8 +647,6 @@ int cmd_top(int argc, const char **argv, const char *prefix) page_size = sysconf(_SC_PAGE_SIZE); create_events_help(events_help_msg); argc = parse_options(argc, argv, options, top_usage, 0); if (argc) usage_with_options(top_usage, options); Loading Loading
Documentation/perf_counter/Makefile +1 −0 Original line number Diff line number Diff line Loading @@ -328,6 +328,7 @@ BUILTIN_OBJS += builtin-record.o BUILTIN_OBJS += builtin-report.o BUILTIN_OBJS += builtin-stat.o BUILTIN_OBJS += builtin-top.o BUILTIN_OBJS += builtin-list.o PERFLIBS = $(LIB_FILE) EXTLIBS = Loading
Documentation/perf_counter/builtin-list.c 0 → 100644 +20 −0 Original line number Diff line number Diff line /* * builtin-list.c * * Builtin list command: list all event types * * Copyright (C) 2009, Thomas Gleixner <tglx@linutronix.de> * Copyright (C) 2008-2009, Red Hat Inc, Ingo Molnar <mingo@redhat.com> */ #include "builtin.h" #include "perf.h" #include "util/parse-options.h" #include "util/parse-events.h" int cmd_list(int argc, const char **argv, const char *prefix) { print_events(); return 0; }
Documentation/perf_counter/builtin-record.c +2 −5 Original line number Diff line number Diff line Loading @@ -495,11 +495,10 @@ static const char * const record_usage[] = { NULL }; static char events_help_msg[EVENTS_HELP_MAX]; static const struct option options[] = { OPT_CALLBACK('e', "event", NULL, "event", events_help_msg, parse_events), "event selector. use 'perf list' to list available events", parse_events), OPT_INTEGER('p', "pid", &target_pid, "record events on existing pid"), OPT_INTEGER('r', "realtime", &realtime_prio, Loading Loading @@ -527,8 +526,6 @@ int cmd_record(int argc, const char **argv, const char *prefix) { int counter; create_events_help(events_help_msg); argc = parse_options(argc, argv, options, record_usage, 0); if (!argc && target_pid == -1 && !system_wide) usage_with_options(record_usage, options); Loading
Documentation/perf_counter/builtin-stat.c +3 −6 Original line number Diff line number Diff line Loading @@ -293,18 +293,17 @@ static const char * const stat_usage[] = { NULL }; static char events_help_msg[EVENTS_HELP_MAX]; static const struct option options[] = { OPT_CALLBACK('e', "event", NULL, "event", events_help_msg, parse_events), "event selector. use 'perf list' to list available events", parse_events), OPT_BOOLEAN('i', "inherit", &inherit, "child tasks inherit counters"), OPT_INTEGER('p', "pid", &target_pid, "stat events on existing pid"), OPT_BOOLEAN('a', "all-cpus", &system_wide, "system-wide collection from all CPUs"), OPT_BOOLEAN('l', "scale", &scale, OPT_BOOLEAN('S', "scale", &scale, "scale/normalize counters"), OPT_END() }; Loading @@ -313,8 +312,6 @@ int cmd_stat(int argc, const char **argv, const char *prefix) { page_size = sysconf(_SC_PAGE_SIZE); create_events_help(events_help_msg); memcpy(attrs, default_attrs, sizeof(attrs)); argc = parse_options(argc, argv, options, stat_usage, 0); Loading
Documentation/perf_counter/builtin-top.c +2 −5 Original line number Diff line number Diff line Loading @@ -606,11 +606,10 @@ static const char * const top_usage[] = { NULL }; static char events_help_msg[EVENTS_HELP_MAX]; static const struct option options[] = { OPT_CALLBACK('e', "event", NULL, "event", events_help_msg, parse_events), "event selector. use 'perf list' to list available events", parse_events), OPT_INTEGER('c', "count", &default_interval, "event period to sample"), OPT_INTEGER('p', "pid", &target_pid, Loading Loading @@ -648,8 +647,6 @@ int cmd_top(int argc, const char **argv, const char *prefix) page_size = sysconf(_SC_PAGE_SIZE); create_events_help(events_help_msg); argc = parse_options(argc, argv, options, top_usage, 0); if (argc) usage_with_options(top_usage, options); Loading