aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-trace.c
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2010-10-10 11:10:03 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-10-23 13:31:20 -0400
commit44e668c6faa9a6c477a32788e7e88f0754c54a4e (patch)
tree59f100bc808cdd232d0896b348144e6482a4ca76 /tools/perf/builtin-trace.c
parentffec516976f64b4e3e59ba1bb8a5020008cc678a (diff)
perf trace: Use $PERF_EXEC_PATH in canned report scripts
Set $PERF_EXEC_PATH before starting the record and report scripts, and make them use it where necessary. Cc: Ingo Molnar <mingo@elte.hu> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <1286723403.2955.205.camel@localhost> Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-trace.c')
-rw-r--r--tools/perf/builtin-trace.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 40a6a2992d15..3ea62199ffe1 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
47static void setup_scripting(void) 47static 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
@@ -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];