Commit-ID:  28939e1a1f6d198239d86b1d77fa9fd55773189a
Gitweb:     http://git.kernel.org/tip/28939e1a1f6d198239d86b1d77fa9fd55773189a
Author:     Jiri Olsa <[email protected]>
AuthorDate: Mon, 6 Apr 2015 14:36:08 +0900
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Wed, 8 Apr 2015 09:07:14 -0300

perf kmem: Respect -i option

Currently the perf kmem does not respect -i option.

Initializing the file.path properly after options get parsed.

Signed-off-by: Jiri Olsa <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Joonsoo Kim <[email protected]>
Cc: Minchan Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: [email protected]
Link: 
http://lkml.kernel.org/r/[email protected]
Signed-off-by: Namhyung Kim <[email protected]>
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
---
 tools/perf/builtin-kmem.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
index ac303ef..4ebf65c 100644
--- a/tools/perf/builtin-kmem.c
+++ b/tools/perf/builtin-kmem.c
@@ -663,7 +663,6 @@ int cmd_kmem(int argc, const char **argv, const char 
*prefix __maybe_unused)
 {
        const char * const default_sort_order = "frag,hit,bytes";
        struct perf_data_file file = {
-               .path = input_name,
                .mode = PERF_DATA_MODE_READ,
        };
        const struct option kmem_options[] = {
@@ -701,6 +700,8 @@ int cmd_kmem(int argc, const char **argv, const char 
*prefix __maybe_unused)
                return __cmd_record(argc, argv);
        }
 
+       file.path = input_name;
+
        session = perf_session__new(&file, false, &perf_kmem);
        if (session == NULL)
                return -1;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to