diff options
Diffstat (limited to 'tools/perf/builtin-trace.c')
-rw-r--r-- | tools/perf/builtin-trace.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 40a6a2992d15..deda1a93131e 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c | |||
@@ -46,9 +46,6 @@ static struct scripting_ops *scripting_ops; | |||
46 | 46 | ||
47 | static void setup_scripting(void) | 47 | static void setup_scripting(void) |
48 | { | 48 | { |
49 | /* make sure PERF_EXEC_PATH is set for scripts */ | ||
50 | perf_set_argv_exec_path(perf_exec_path()); | ||
51 | |||
52 | setup_perl_scripting(); | 49 | setup_perl_scripting(); |
53 | setup_python_scripting(); | 50 | setup_python_scripting(); |
54 | 51 | ||
@@ -285,7 +282,7 @@ static int parse_scriptname(const struct option *opt __used, | |||
285 | script++; | 282 | script++; |
286 | } else { | 283 | } else { |
287 | script = str; | 284 | script = str; |
288 | ext = strchr(script, '.'); | 285 | ext = strrchr(script, '.'); |
289 | if (!ext) { | 286 | if (!ext) { |
290 | fprintf(stderr, "invalid script extension"); | 287 | fprintf(stderr, "invalid script extension"); |
291 | return -1; | 288 | return -1; |
@@ -593,6 +590,9 @@ int cmd_trace(int argc, const char **argv, const char *prefix __used) | |||
593 | suffix = REPORT_SUFFIX; | 590 | suffix = REPORT_SUFFIX; |
594 | } | 591 | } |
595 | 592 | ||
593 | /* make sure PERF_EXEC_PATH is set for scripts */ | ||
594 | perf_set_argv_exec_path(perf_exec_path()); | ||
595 | |||
596 | if (!suffix && argc >= 2 && strncmp(argv[1], "-", strlen("-")) != 0) { | 596 | if (!suffix && argc >= 2 && strncmp(argv[1], "-", strlen("-")) != 0) { |
597 | char *record_script_path, *report_script_path; | 597 | char *record_script_path, *report_script_path; |
598 | int live_pipe[2]; | 598 | int live_pipe[2]; |