diff options
Diffstat (limited to 'tools/perf/builtin-report.c')
-rw-r--r-- | tools/perf/builtin-report.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 90d1162bb8b8..f07eae73e692 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c | |||
@@ -40,7 +40,6 @@ | |||
40 | struct perf_report { | 40 | struct perf_report { |
41 | struct perf_tool tool; | 41 | struct perf_tool tool; |
42 | struct perf_session *session; | 42 | struct perf_session *session; |
43 | char const *input_name; | ||
44 | bool force, use_tui, use_gtk, use_stdio; | 43 | bool force, use_tui, use_gtk, use_stdio; |
45 | bool hide_unresolved; | 44 | bool hide_unresolved; |
46 | bool dont_use_callchains; | 45 | bool dont_use_callchains; |
@@ -571,7 +570,7 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused) | |||
571 | .pretty_printing_style = "normal", | 570 | .pretty_printing_style = "normal", |
572 | }; | 571 | }; |
573 | const struct option options[] = { | 572 | const struct option options[] = { |
574 | OPT_STRING('i', "input", &report.input_name, "file", | 573 | OPT_STRING('i', "input", &input_name, "file", |
575 | "input file name"), | 574 | "input file name"), |
576 | OPT_INCR('v', "verbose", &verbose, | 575 | OPT_INCR('v', "verbose", &verbose, |
577 | "be more verbose (show symbol address, etc)"), | 576 | "be more verbose (show symbol address, etc)"), |
@@ -657,13 +656,13 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused) | |||
657 | if (report.inverted_callchain) | 656 | if (report.inverted_callchain) |
658 | callchain_param.order = ORDER_CALLER; | 657 | callchain_param.order = ORDER_CALLER; |
659 | 658 | ||
660 | if (!report.input_name || !strlen(report.input_name)) { | 659 | if (!input_name || !strlen(input_name)) { |
661 | if (!fstat(STDIN_FILENO, &st) && S_ISFIFO(st.st_mode)) | 660 | if (!fstat(STDIN_FILENO, &st) && S_ISFIFO(st.st_mode)) |
662 | report.input_name = "-"; | 661 | input_name = "-"; |
663 | else | 662 | else |
664 | report.input_name = "perf.data"; | 663 | input_name = "perf.data"; |
665 | } | 664 | } |
666 | session = perf_session__new(report.input_name, O_RDONLY, | 665 | session = perf_session__new(input_name, O_RDONLY, |
667 | report.force, false, &report.tool); | 666 | report.force, false, &report.tool); |
668 | if (session == NULL) | 667 | if (session == NULL) |
669 | return -ENOMEM; | 668 | return -ENOMEM; |
@@ -694,7 +693,7 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused) | |||
694 | 693 | ||
695 | } | 694 | } |
696 | 695 | ||
697 | if (strcmp(report.input_name, "-") != 0) | 696 | if (strcmp(input_name, "-") != 0) |
698 | setup_browser(true); | 697 | setup_browser(true); |
699 | else { | 698 | else { |
700 | use_browser = 0; | 699 | use_browser = 0; |