diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-10-26 09:30:22 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-10-26 09:30:22 +0200 |
commit | 5df414c61e1b6f15bdc3759f292c7404286c9827 (patch) | |
tree | 41b50a595fc53de595edcc20b350c048ce2856fc /tools/perf/builtin-trace.c | |
parent | Merge branch 'x86' of git://git.kernel.org/pub/scm/linux/kernel/git/rric/opro... (diff) | |
parent | perf python scripting: Support fedora 11 (audit 1.7.17) (diff) | |
download | linux-5df414c61e1b6f15bdc3759f292c7404286c9827.tar.xz linux-5df414c61e1b6f15bdc3759f292c7404286c9827.zip |
Merge branch 'perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 into perf/urgent
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; static void setup_scripting(void) { - /* make sure PERF_EXEC_PATH is set for scripts */ - perf_set_argv_exec_path(perf_exec_path()); - setup_perl_scripting(); setup_python_scripting(); @@ -285,7 +282,7 @@ static int parse_scriptname(const struct option *opt __used, script++; } else { script = str; - ext = strchr(script, '.'); + ext = strrchr(script, '.'); if (!ext) { fprintf(stderr, "invalid script extension"); return -1; @@ -593,6 +590,9 @@ int cmd_trace(int argc, const char **argv, const char *prefix __used) suffix = REPORT_SUFFIX; } + /* make sure PERF_EXEC_PATH is set for scripts */ + perf_set_argv_exec_path(perf_exec_path()); + if (!suffix && argc >= 2 && strncmp(argv[1], "-", strlen("-")) != 0) { char *record_script_path, *report_script_path; int live_pipe[2]; |