aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-record.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2010-05-17 14:39:16 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-05-17 14:43:38 -0400
commit1967936d688c475b85d34d84e09858cf514c893c (patch)
treee9788fe79c7d2af4ad1fab0d9cfe4b3822f468ff /tools/perf/builtin-record.c
parentc100edbee8dbf033ec4095a976a74c1c75c9fc1d (diff)
perf options: Check v type in OPT_U?INTEGER
To avoid problems like the one fixed by Stephane Eranian in 3de29ca, now we'll got this instead: bench/sched-messaging.c:259: error: negative width in bit-field ‘<anonymous>’ bench/sched-messaging.c:261: error: negative width in bit-field ‘<anonymous>’ Which is rather cryptic, but is how BUILD_BUG_ON_ZERO works, so kernel hackers should be already used to this. With it in place found some problems, fixed by changing the affected variables to sensible types or changed some OPT_INTEGER to OPT_UINTEGER. Next csets will go thru converting each of the remaining OPT_ so that review can be made easier by grouping changes per type per patch. Cc: Frédéric Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com> Cc: Tom Zanussi <tzanussi@gmail.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-record.c')
-rw-r--r--tools/perf/builtin-record.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index b93573c7ac0b..cb46c7d0ea99 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -45,7 +45,7 @@ static int output;
45static int pipe_output = 0; 45static int pipe_output = 0;
46static const char *output_name = "perf.data"; 46static const char *output_name = "perf.data";
47static int group = 0; 47static int group = 0;
48static unsigned int realtime_prio = 0; 48static int realtime_prio = 0;
49static bool raw_samples = false; 49static bool raw_samples = false;
50static bool system_wide = false; 50static bool system_wide = false;
51static int profile_cpu = -1; 51static int profile_cpu = -1;
@@ -822,10 +822,8 @@ static const struct option options[] = {
822 "output file name"), 822 "output file name"),
823 OPT_BOOLEAN('i', "no-inherit", &no_inherit, 823 OPT_BOOLEAN('i', "no-inherit", &no_inherit,
824 "child tasks do not inherit counters"), 824 "child tasks do not inherit counters"),
825 OPT_INTEGER('F', "freq", &user_freq, 825 OPT_UINTEGER('F', "freq", &user_freq, "profile at this frequency"),
826 "profile at this frequency"), 826 OPT_UINTEGER('m', "mmap-pages", &mmap_pages, "number of mmap data pages"),
827 OPT_INTEGER('m', "mmap-pages", &mmap_pages,
828 "number of mmap data pages"),
829 OPT_BOOLEAN('g', "call-graph", &call_graph, 827 OPT_BOOLEAN('g', "call-graph", &call_graph,
830 "do call-graph (stack chain/backtrace) recording"), 828 "do call-graph (stack chain/backtrace) recording"),
831 OPT_INCR('v', "verbose", &verbose, 829 OPT_INCR('v', "verbose", &verbose,