summaryrefslogtreecommitdiff
path: root/debian/tools/perf
diff options
context:
space:
mode:
Diffstat (limited to 'debian/tools/perf')
-rw-r--r--debian/tools/perf16
1 files changed, 16 insertions, 0 deletions
diff --git a/debian/tools/perf b/debian/tools/perf
new file mode 100644
index 00000000000..ab35fab9f0f
--- /dev/null
+++ b/debian/tools/perf
@@ -0,0 +1,16 @@
+#!/bin/bash
+full_version=`uname -r`
+
+# Removing flavour from version i.e. generic or server.
+flavour_abi=${full_version#*-}
+flavour=${flavour_abi#*-}
+version=${full_version%-$flavour}
+perf="perf_$version"
+
+if ! which "$perf" > /dev/null; then
+ echo "$perf not found" >&2
+ echo "You may need to install linux-tools-$version" >&2
+ exit 2
+fi
+
+exec "$perf" "$@"