perf annotate: Fix -i option, which is currently ignored.
authorMartin Liška <mliska@suse.cz>
Fri, 29 May 2015 12:06:44 +0000 (14:06 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 29 May 2015 15:43:34 +0000 (12:43 -0300)
Assign input_name, received from program arguments, to file data
structure.

Signed-off-by: Martin Liska <mliska@suse.cz>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/55685654.2010209@suse.cz
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-annotate.c

index c434e1264087f6eb5b8062eb4059ccb4c4a02d29..4e08c2d2090e574b1d5a9422bc4908e980410f79 100644 (file)
@@ -289,7 +289,6 @@ int cmd_annotate(int argc, const char **argv, const char *prefix __maybe_unused)
                },
        };
        struct perf_data_file file = {
-               .path  = input_name,
                .mode  = PERF_DATA_MODE_READ,
        };
        const struct option options[] = {
@@ -346,6 +345,8 @@ int cmd_annotate(int argc, const char **argv, const char *prefix __maybe_unused)
        else if (annotate.use_gtk)
                use_browser = 2;
 
+       file.path  = input_name;
+
        setup_browser(true);
 
        annotate.session = perf_session__new(&file, false, &annotate.tool);