aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/builtin-record.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 0f467cf7aa72..b93573c7ac0b 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -33,8 +33,8 @@ enum write_mode_t {
33 33
34static int *fd[MAX_NR_CPUS][MAX_COUNTERS]; 34static int *fd[MAX_NR_CPUS][MAX_COUNTERS];
35 35
36static unsigned int user_interval = UINT_MAX; 36static u64 user_interval = ULLONG_MAX;
37static long default_interval = 0; 37static u64 default_interval = 0;
38 38
39static int nr_cpus = 0; 39static int nr_cpus = 0;
40static unsigned int page_size; 40static unsigned int page_size;
@@ -268,7 +268,7 @@ static void create_counter(int counter, int cpu)
268 * it a weak assumption overridable by the user. 268 * it a weak assumption overridable by the user.
269 */ 269 */
270 if (!attr->sample_period || (user_freq != UINT_MAX && 270 if (!attr->sample_period || (user_freq != UINT_MAX &&
271 user_interval != UINT_MAX)) { 271 user_interval != ULLONG_MAX)) {
272 if (freq) { 272 if (freq) {
273 attr->sample_type |= PERF_SAMPLE_PERIOD; 273 attr->sample_type |= PERF_SAMPLE_PERIOD;
274 attr->freq = 1; 274 attr->freq = 1;
@@ -817,8 +817,7 @@ static const struct option options[] = {
817 "CPU to profile on"), 817 "CPU to profile on"),
818 OPT_BOOLEAN('f', "force", &force, 818 OPT_BOOLEAN('f', "force", &force,
819 "overwrite existing data file (deprecated)"), 819 "overwrite existing data file (deprecated)"),
820 OPT_LONG('c', "count", &user_interval, 820 OPT_U64('c', "count", &user_interval, "event period to sample"),
821 "event period to sample"),
822 OPT_STRING('o', "output", &output_name, "file", 821 OPT_STRING('o', "output", &output_name, "file",
823 "output file name"), 822 "output file name"),
824 OPT_BOOLEAN('i', "no-inherit", &no_inherit, 823 OPT_BOOLEAN('i', "no-inherit", &no_inherit,
@@ -901,7 +900,7 @@ int cmd_record(int argc, const char **argv, const char *prefix __used)
901 if (!event_array) 900 if (!event_array)
902 return -ENOMEM; 901 return -ENOMEM;
903 902
904 if (user_interval != UINT_MAX) 903 if (user_interval != ULLONG_MAX)
905 default_interval = user_interval; 904 default_interval = user_interval;
906 if (user_freq != UINT_MAX) 905 if (user_freq != UINT_MAX)
907 freq = user_freq; 906 freq = user_freq;