Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 44e668c6 authored by Ben Hutchings's avatar Ben Hutchings Committed by Arnaldo Carvalho de Melo
Browse files

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: default avatarBen Hutchings <ben@decadent.org.uk>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent ffec5169
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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();

@@ -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];
+1 −1
Original line number Diff line number Diff line
@@ -7,4 +7,4 @@ if [ $# -gt 0 ] ; then
	shift
    fi
fi
perf trace $@ -s ~/libexec/perf-core/scripts/perl/failed-syscalls.pl $comm
perf trace $@ -s "$PERF_EXEC_PATH"/scripts/perl/failed-syscalls.pl $comm
+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ if [ $# -lt 1 ] ; then
fi
comm=$1
shift
perf trace $@ -s ~/libexec/perf-core/scripts/perl/rw-by-file.pl $comm
perf trace $@ -s "$PERF_EXEC_PATH"/scripts/perl/rw-by-file.pl $comm


+1 −1
Original line number Diff line number Diff line
#!/bin/bash
# description: system-wide r/w activity
perf trace $@ -s ~/libexec/perf-core/scripts/perl/rw-by-pid.pl
perf trace $@ -s "$PERF_EXEC_PATH"/scripts/perl/rw-by-pid.pl


+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ if [ "$n_args" -gt 0 ] ; then
    interval=$1
    shift
fi
perf trace $@ -s ~/libexec/perf-core/scripts/perl/rwtop.pl $interval
perf trace $@ -s "$PERF_EXEC_PATH"/scripts/perl/rwtop.pl $interval


Loading