aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/ui/browsers/scripts.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2019-08-27 04:22:25 -0400
committerIngo Molnar <mingo@kernel.org>2019-08-27 04:22:25 -0400
commit794b8bedca9341569e1081bc880e7ea209dbca5c (patch)
treeaccdfe136daf45dea3ee62567a53ae2bfb0f7fd8 /tools/perf/ui/browsers/scripts.c
parent39152ee51b77851689f9b23fde6f610d13566c39 (diff)
parent74a1e863eb73dcc9f069b671dfb40650f3832116 (diff)
Merge tag 'perf-core-for-mingo-5.4-20190826' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: perf report: Andi Kleen: - Make --ns time sort key output column wide enough for nanoseconds. perf script: Gustavo A. R. Silva: - Fix memory leaks in list_scripts() perf tests: James Clark: - Fixes hang in zstd compression test by changing the source of random data. perf trace: Arnaldo Carvalho de Melo: - augmented_raw_syscalls.c BPF helper improvements. Benjamin Peterson: - Fix off-by-one error in ioctl cmd->string table. libperf: Jiri Olsa: - Move most PERF_RECORD_ structs to perf/event.h. headers: Arnaldo Carvalho de Melo: - Move cacheline related routines to separate source files. - Move record_opts and other record declarations to separate files. - Explicitly add some more needed headers here and there. Souptick Joarder: - Remove some duplicate include directives. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/ui/browsers/scripts.c')
-rw-r--r--tools/perf/ui/browsers/scripts.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/perf/ui/browsers/scripts.c b/tools/perf/ui/browsers/scripts.c
index 04f9aff5621e..50e0c03171f2 100644
--- a/tools/perf/ui/browsers/scripts.c
+++ b/tools/perf/ui/browsers/scripts.c
@@ -1,5 +1,7 @@
1// SPDX-License-Identifier: GPL-2.0 1// SPDX-License-Identifier: GPL-2.0
2#include "../../builtin.h"
2#include "../../util/sort.h" 3#include "../../util/sort.h"
4#include "../../util/util.h"
3#include "../../util/hist.h" 5#include "../../util/hist.h"
4#include "../../util/debug.h" 6#include "../../util/debug.h"
5#include "../../util/symbol.h" 7#include "../../util/symbol.h"
@@ -131,8 +133,10 @@ static int list_scripts(char *script_name, bool *custom,
131 int key = ui_browser__input_window("perf script command", 133 int key = ui_browser__input_window("perf script command",
132 "Enter perf script command line (without perf script prefix)", 134 "Enter perf script command line (without perf script prefix)",
133 script_args, "", 0); 135 script_args, "", 0);
134 if (key != K_ENTER) 136 if (key != K_ENTER) {
135 return -1; 137 ret = -1;
138 goto out;
139 }
136 sprintf(script_name, "%s script %s", perf, script_args); 140 sprintf(script_name, "%s script %s", perf, script_args);
137 } else if (choice < num + max_std) { 141 } else if (choice < num + max_std) {
138 strcpy(script_name, paths[choice]); 142 strcpy(script_name, paths[choice]);