perf: Move scripts to /usr/share/perf-core in linux-base package (Closes: #599624)
svn path=/dists/trunk/linux-2.6/; revision=16420
This commit is contained in:
parent
439fcd4674
commit
3fd8f69aad
|
@ -7,6 +7,8 @@ linux-2.6 (2.6.36~rc7-1~experimental.1) UNRELEASED; urgency=low
|
|||
* [x86] Staging: fix Makefile so brcm80211 will actually build
|
||||
(Closes: #599465)
|
||||
* [x86] Enable modular IDEAPAD_ACPI (Closes: #599444)
|
||||
* perf: Move scripts to /usr/share/perf-core in linux-base package
|
||||
(Closes: #599624)
|
||||
|
||||
-- Ben Hutchings <ben@decadent.org.uk> Thu, 07 Oct 2010 03:24:21 +0100
|
||||
|
||||
|
|
172
debian/patches/bugfix/all/perf-Use-PERF_EXEC_PATH-in-canned-report-scripts.patch
vendored
Normal file
172
debian/patches/bugfix/all/perf-Use-PERF_EXEC_PATH-in-canned-report-scripts.patch
vendored
Normal file
|
@ -0,0 +1,172 @@
|
|||
From d8eea3fc6c77e5de595efeda8b8747c8588e4df8 Mon Sep 17 00:00:00 2001
|
||||
From: Ben Hutchings <ben@decadent.org.uk>
|
||||
Date: Sun, 10 Oct 2010 02:20:51 +0100
|
||||
Subject: [PATCH] perf: 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.
|
||||
|
||||
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
|
||||
---
|
||||
tools/perf/builtin-trace.c | 6 +++---
|
||||
tools/perf/scripts/perl/bin/failed-syscalls-report | 2 +-
|
||||
tools/perf/scripts/perl/bin/rw-by-file-report | 2 +-
|
||||
tools/perf/scripts/perl/bin/rw-by-pid-report | 2 +-
|
||||
tools/perf/scripts/perl/bin/rwtop-report | 2 +-
|
||||
tools/perf/scripts/perl/bin/wakeup-latency-report | 2 +-
|
||||
tools/perf/scripts/perl/bin/workqueue-stats-report | 2 +-
|
||||
.../python/bin/failed-syscalls-by-pid-report | 2 +-
|
||||
.../perf/scripts/python/bin/sched-migration-report | 2 +-
|
||||
tools/perf/scripts/python/bin/sctop-report | 2 +-
|
||||
.../python/bin/syscall-counts-by-pid-report | 2 +-
|
||||
.../perf/scripts/python/bin/syscall-counts-report | 2 +-
|
||||
12 files changed, 14 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
|
||||
index 40a6a29..3ea6219 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();
|
||||
|
||||
@@ -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];
|
||||
diff --git a/tools/perf/scripts/perl/bin/failed-syscalls-report b/tools/perf/scripts/perl/bin/failed-syscalls-report
|
||||
index e3a5e55..4028d92 100644
|
||||
--- a/tools/perf/scripts/perl/bin/failed-syscalls-report
|
||||
+++ b/tools/perf/scripts/perl/bin/failed-syscalls-report
|
||||
@@ -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
|
||||
diff --git a/tools/perf/scripts/perl/bin/rw-by-file-report b/tools/perf/scripts/perl/bin/rw-by-file-report
|
||||
index d83070b..ba25f4d 100644
|
||||
--- a/tools/perf/scripts/perl/bin/rw-by-file-report
|
||||
+++ b/tools/perf/scripts/perl/bin/rw-by-file-report
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
diff --git a/tools/perf/scripts/perl/bin/rw-by-pid-report b/tools/perf/scripts/perl/bin/rw-by-pid-report
|
||||
index 7ef4698..641a3f5 100644
|
||||
--- a/tools/perf/scripts/perl/bin/rw-by-pid-report
|
||||
+++ b/tools/perf/scripts/perl/bin/rw-by-pid-report
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/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
|
||||
|
||||
|
||||
|
||||
diff --git a/tools/perf/scripts/perl/bin/rwtop-report b/tools/perf/scripts/perl/bin/rwtop-report
|
||||
index 93e698c..4918dba 100644
|
||||
--- a/tools/perf/scripts/perl/bin/rwtop-report
|
||||
+++ b/tools/perf/scripts/perl/bin/rwtop-report
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
diff --git a/tools/perf/scripts/perl/bin/wakeup-latency-report b/tools/perf/scripts/perl/bin/wakeup-latency-report
|
||||
index a0d898f..49052eb 100644
|
||||
--- a/tools/perf/scripts/perl/bin/wakeup-latency-report
|
||||
+++ b/tools/perf/scripts/perl/bin/wakeup-latency-report
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
# description: system-wide min/max/avg wakeup latency
|
||||
-perf trace $@ -s ~/libexec/perf-core/scripts/perl/wakeup-latency.pl
|
||||
+perf trace $@ -s "$PERF_EXEC_PATH"/scripts/perl/wakeup-latency.pl
|
||||
|
||||
|
||||
|
||||
diff --git a/tools/perf/scripts/perl/bin/workqueue-stats-report b/tools/perf/scripts/perl/bin/workqueue-stats-report
|
||||
index 3508113..df0c65f 100644
|
||||
--- a/tools/perf/scripts/perl/bin/workqueue-stats-report
|
||||
+++ b/tools/perf/scripts/perl/bin/workqueue-stats-report
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
# description: workqueue stats (ins/exe/create/destroy)
|
||||
-perf trace $@ -s ~/libexec/perf-core/scripts/perl/workqueue-stats.pl
|
||||
+perf trace $@ -s "$PERF_EXEC_PATH"/scripts/perl/workqueue-stats.pl
|
||||
|
||||
|
||||
|
||||
diff --git a/tools/perf/scripts/python/bin/failed-syscalls-by-pid-report b/tools/perf/scripts/python/bin/failed-syscalls-by-pid-report
|
||||
index 3029354..af97430 100644
|
||||
--- a/tools/perf/scripts/python/bin/failed-syscalls-by-pid-report
|
||||
+++ b/tools/perf/scripts/python/bin/failed-syscalls-by-pid-report
|
||||
@@ -7,4 +7,4 @@ if [ $# -gt 0 ] ; then
|
||||
shift
|
||||
fi
|
||||
fi
|
||||
-perf trace $@ -s ~/libexec/perf-core/scripts/python/failed-syscalls-by-pid.py $comm
|
||||
+perf trace $@ -s "$PERF_EXEC_PATH"/perf-core/scripts/python/failed-syscalls-by-pid.py $comm
|
||||
diff --git a/tools/perf/scripts/python/bin/sched-migration-report b/tools/perf/scripts/python/bin/sched-migration-report
|
||||
index 61d05f7..d1e8e24 100644
|
||||
--- a/tools/perf/scripts/python/bin/sched-migration-report
|
||||
+++ b/tools/perf/scripts/python/bin/sched-migration-report
|
||||
@@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
# description: sched migration overview
|
||||
-perf trace $@ -s ~/libexec/perf-core/scripts/python/sched-migration.py
|
||||
+perf trace $@ -s "$PERF_EXEC_PATH"/perf-core/scripts/python/sched-migration.py
|
||||
diff --git a/tools/perf/scripts/python/bin/sctop-report b/tools/perf/scripts/python/bin/sctop-report
|
||||
index b01c842..ad8c881 100644
|
||||
--- a/tools/perf/scripts/python/bin/sctop-report
|
||||
+++ b/tools/perf/scripts/python/bin/sctop-report
|
||||
@@ -21,4 +21,4 @@ elif [ "$n_args" -gt 0 ] ; then
|
||||
interval=$1
|
||||
shift
|
||||
fi
|
||||
-perf trace $@ -s ~/libexec/perf-core/scripts/python/sctop.py $comm $interval
|
||||
+perf trace $@ -s "$PERF_EXEC_PATH"/perf-core/scripts/python/sctop.py $comm $interval
|
||||
diff --git a/tools/perf/scripts/python/bin/syscall-counts-by-pid-report b/tools/perf/scripts/python/bin/syscall-counts-by-pid-report
|
||||
index 9e9d8dd..496d205 100644
|
||||
--- a/tools/perf/scripts/python/bin/syscall-counts-by-pid-report
|
||||
+++ b/tools/perf/scripts/python/bin/syscall-counts-by-pid-report
|
||||
@@ -7,4 +7,4 @@ if [ $# -gt 0 ] ; then
|
||||
shift
|
||||
fi
|
||||
fi
|
||||
-perf trace $@ -s ~/libexec/perf-core/scripts/python/syscall-counts-by-pid.py $comm
|
||||
+perf trace $@ -s "$PERF_EXEC_PATH"/perf-core/scripts/python/syscall-counts-by-pid.py $comm
|
||||
diff --git a/tools/perf/scripts/python/bin/syscall-counts-report b/tools/perf/scripts/python/bin/syscall-counts-report
|
||||
index dc076b6..c981f7a 100644
|
||||
--- a/tools/perf/scripts/python/bin/syscall-counts-report
|
||||
+++ b/tools/perf/scripts/python/bin/syscall-counts-report
|
||||
@@ -7,4 +7,4 @@ if [ $# -gt 0 ] ; then
|
||||
shift
|
||||
fi
|
||||
fi
|
||||
-perf trace $@ -s ~/libexec/perf-core/scripts/python/syscall-counts.py $comm
|
||||
+perf trace $@ -s "$PERF_EXEC_PATH"/perf-core/scripts/python/syscall-counts.py $comm
|
||||
--
|
||||
1.7.1
|
||||
|
|
@ -47,3 +47,4 @@
|
|||
|
||||
+ bugfix/all/vivi-Don-t-depend-on-FONTS.patch
|
||||
+ bugfix/all/qla4xxx-Fix-build-on-some-architectures-lacking-64-bit-I-O.patch
|
||||
+ bugfix/all/perf-Use-PERF_EXEC_PATH-in-canned-report-scripts.patch
|
||||
|
|
|
@ -32,7 +32,7 @@ setup_env += DISTRIBUTION_OFFICIAL_BUILD=1 DISTRIBUTION_UPLOADER=$(UPLOADER) DIS
|
|||
MAKE_CLEAN = $(setup_env) $(MAKE)
|
||||
MAKE_SELF := $(MAKE) -f debian/rules.real $(MAKEOVERRIDES)
|
||||
MAKEOVERRIDES =
|
||||
MAKE_PERF_VARS = prefix=/usr NO_PERL=1 V=2
|
||||
MAKE_PERF_VARS = prefix=/usr perfexecdir=share/perf-core NO_PERL=1 V=2
|
||||
|
||||
#
|
||||
# Targets
|
||||
|
@ -503,6 +503,8 @@ install-tools_$(ARCH): $(STAMPS_DIR)/build-tools_$(ARCH)
|
|||
# Fix up cross-references
|
||||
sed -i '/^\.SH "SEE ALSO"/,/^\.SH/ { s/perf-/perf_$(VERSION)-/g }' \
|
||||
$(PACKAGE_DIR)/usr/share/man/*/*
|
||||
# Remove scripts
|
||||
rm -rf $(PACKAGE_DIR)/usr/share/perf-core
|
||||
+$(MAKE_SELF) install-base
|
||||
|
||||
install-patch: PACKAGE = linux-patch-debian-$(VERSION)
|
||||
|
@ -542,12 +544,20 @@ install-firmware: $(STAMPS_DIR)/source
|
|||
+$(MAKE_SELF) install-base
|
||||
|
||||
install-linux-base: PACKAGE_NAME = linux-base
|
||||
install-linux-base: PACKAGE_DIR = debian/$(PACKAGE_NAME)
|
||||
install-linux-base: DH_OPTIONS := -p$(PACKAGE_NAME)
|
||||
install-linux-base:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_prep
|
||||
dh_install debian/bin/perf /usr/bin
|
||||
dh_installdirs /usr/share/perf-core
|
||||
for source in debian/build/source/tools/perf/perf-*.sh; do \
|
||||
dest=usr/share/perf-core/"$$(basename $$source .sh)"; \
|
||||
cp -dp "$$source" $(PACKAGE_DIR)/"$$dest" || exit; \
|
||||
done
|
||||
cp -dpR debian/build/source/tools/perf/scripts \
|
||||
$(PACKAGE_DIR)/usr/share/perf-core/scripts
|
||||
dh_installman debian/perf.1
|
||||
dh_installdebconf
|
||||
+$(MAKE_SELF) install-base
|
||||
|
|
|
@ -1,14 +1,10 @@
|
|||
Package: linux-tools-@version@
|
||||
Architecture: alpha amd64 armel hppa i386 powerpc s390 sh4 sparc sparc64
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Recommends: linux-base (>= 2.6.32-16)
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, linux-base (>= 2.6.32-16)
|
||||
Suggests: linux-doc-@version@
|
||||
Description: Performance analysis tools for Linux @upstreamversion@
|
||||
This package contains the 'perf' performance analysis tools for Linux
|
||||
kernel version @upstreamversion@.
|
||||
.
|
||||
The linux-base package contains a 'perf' command which will invoke the
|
||||
appropriate version for the running kernel.
|
||||
|
||||
Package: linux-source-@version@
|
||||
Architecture: all
|
||||
|
@ -97,5 +93,5 @@ Architecture: all
|
|||
Depends: libuuid-perl, ${misc:Depends}, util-linux (>= 2.16-1) | udev (<< 146-1)
|
||||
Description: Linux image base package
|
||||
This package contains files and support scripts for all Linux
|
||||
images.
|
||||
images and for the 'perf' tools.
|
||||
|
||||
|
|
Loading…
Reference in New Issue