summaryrefslogtreecommitdiffstats
path: root/perf
diff options
context:
space:
mode:
Diffstat (limited to 'perf')
-rw-r--r--perf12
1 files changed, 12 insertions, 0 deletions
diff --git a/perf b/perf
new file mode 100644
index 0000000..ea89806
--- /dev/null
+++ b/perf
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# In pathological situations, this will print some error about uname.
+kverrel="`uname -r`" || exit
+
+exec "/usr/libexec/perf.$kverrel" ${1+"$@"}
+rc=$?
+
+# We're still here, so the exec failed.
+echo >&2 "Sorry, your kernel ($kverrel) doesn't support perf."
+
+exit $rc