Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 304922
b: refs/heads/master
c: 77a6f01
h: refs/heads/master
v: v3
  • Loading branch information
Namhyung Kim authored and Arnaldo Carvalho de Melo committed May 7, 2012
1 parent d856fa8 commit da9a974
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 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: d67356e7f80f5c2ef487bedc11a91d5fe18c5a15
refs/heads/master: 77a6f014e9ae330c747c66bebfddf29abf9b89e9
22 changes: 8 additions & 14 deletions trunk/tools/perf/builtin-stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,9 @@ static struct perf_event_attr very_very_detailed_attrs[] = {

static struct perf_evlist *evsel_list;

static struct perf_target target;
static struct perf_target target = {
.uid = UINT_MAX,
};

static int run_idx = 0;
static int run_count = 1;
Expand Down Expand Up @@ -1205,20 +1207,12 @@ int cmd_stat(int argc, const char **argv, const char *prefix __used)

perf_target__validate(&target);

evsel_list->threads = thread_map__new_str(target.pid,
target.tid, UINT_MAX);
if (evsel_list->threads == NULL) {
pr_err("Problems finding threads of monitor\n");
usage_with_options(stat_usage, options);
}

if (target.system_wide)
evsel_list->cpus = cpu_map__new(target.cpu_list);
else
evsel_list->cpus = cpu_map__dummy_new();
if (perf_evlist__create_maps(evsel_list, &target) < 0) {
if (!perf_target__no_task(&target))
pr_err("Problems finding threads of monitor\n");
if (!perf_target__no_cpu(&target))
perror("failed to parse CPUs map");

if (evsel_list->cpus == NULL) {
perror("failed to parse CPUs map");
usage_with_options(stat_usage, options);
return -1;
}
Expand Down

0 comments on commit da9a974

Please sign in to comment.