Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191372
b: refs/heads/master
c: 3de29ca
h: refs/heads/master
v: v3
  • Loading branch information
Stephane Eranian authored and Arnaldo Carvalho de Melo committed May 17, 2010
1 parent 5045841 commit 275cf6c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6ba85cea872954a36d79e46bf6a9c6ea92794f01
refs/heads/master: 3de29cab1f8d62db557a4afed0fb17eebfe64438
11 changes: 5 additions & 6 deletions trunk/tools/perf/builtin-record.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ enum write_mode_t {

static int *fd[MAX_NR_CPUS][MAX_COUNTERS];

static unsigned int user_interval = UINT_MAX;
static long default_interval = 0;
static u64 user_interval = ULLONG_MAX;
static u64 default_interval = 0;

static int nr_cpus = 0;
static unsigned int page_size;
Expand Down Expand Up @@ -268,7 +268,7 @@ static void create_counter(int counter, int cpu)
* it a weak assumption overridable by the user.
*/
if (!attr->sample_period || (user_freq != UINT_MAX &&
user_interval != UINT_MAX)) {
user_interval != ULLONG_MAX)) {
if (freq) {
attr->sample_type |= PERF_SAMPLE_PERIOD;
attr->freq = 1;
Expand Down Expand Up @@ -817,8 +817,7 @@ static const struct option options[] = {
"CPU to profile on"),
OPT_BOOLEAN('f', "force", &force,
"overwrite existing data file (deprecated)"),
OPT_LONG('c', "count", &user_interval,
"event period to sample"),
OPT_U64('c', "count", &user_interval, "event period to sample"),
OPT_STRING('o', "output", &output_name, "file",
"output file name"),
OPT_BOOLEAN('i', "no-inherit", &no_inherit,
Expand Down Expand Up @@ -901,7 +900,7 @@ int cmd_record(int argc, const char **argv, const char *prefix __used)
if (!event_array)
return -ENOMEM;

if (user_interval != UINT_MAX)
if (user_interval != ULLONG_MAX)
default_interval = user_interval;
if (user_freq != UINT_MAX)
freq = user_freq;
Expand Down

0 comments on commit 275cf6c

Please sign in to comment.