[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1329118064-9412-10-git-send-email-namhyung.kim@lge.com>
Date: Mon, 13 Feb 2012 16:27:41 +0900
From: Namhyung Kim <namhyung.kim@....com>
To: Arnaldo Carvalho de Melo <acme@...stprotocols.net>
Cc: Namhyung Kim <namhyung@...il.com>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Paul Mackerras <paulus@...ba.org>, Ingo Molnar <mingo@...e.hu>,
linux-kernel@...r.kernel.org
Subject: [PATCH 09/11] perf stat: Use perf_evlist__create_maps
Use same function with perf record and top to share the code
checks combinations of different switches.
Signed-off-by: Namhyung Kim <namhyung.kim@....com>
---
tools/perf/builtin-stat.c | 16 ++--------------
1 files changed, 2 insertions(+), 14 deletions(-)
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index d080254a2d0c..be2667236bea 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -196,6 +196,7 @@ static int output_fd;
static struct perf_maps_opts maps = {
.target_pid = -1,
.target_tid = -1,
+ .uid = UINT_MAX,
};
static volatile int done = 0;
@@ -1208,20 +1209,7 @@ int cmd_stat(int argc, const char **argv, const char *prefix __used)
check_target_maps(&maps);
- evsel_list->threads = thread_map__new(maps.target_pid, maps.target_tid,
- UINT_MAX);
- if (evsel_list->threads == NULL) {
- pr_err("Problems finding threads of monitor\n");
- usage_with_options(stat_usage, options);
- }
-
- if (maps.system_wide)
- evsel_list->cpus = cpu_map__new(maps.cpu_list);
- else
- evsel_list->cpus = cpu_map__dummy_new();
-
- if (evsel_list->cpus == NULL) {
- perror("failed to parse CPUs map");
+ if (perf_evlist__create_maps(evsel_list, &maps) < 0) {
usage_with_options(stat_usage, options);
return -1;
}
--
1.7.9
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists