| 1 |
#! /bin/sh |
| 2 |
|
| 3 |
echo checking running as root |
| 4 |
if [ `whoami` != "root" ]; then |
| 5 |
echo run as root |
| 6 |
exit 1 |
| 7 |
fi |
| 8 |
|
| 9 |
echo checking /sys/kernel/debug mounted |
| 10 |
if test -d /sys/kernel/debug/tracing/events |
| 11 |
then |
| 12 |
true |
| 13 |
else |
| 14 |
mount -t debugfs /dev/null /sys/kernel/debug |
| 15 |
fi |
| 16 |
|
| 17 |
tmp=`mktemp -d` |
| 18 |
echo made work directory $tmp |
| 19 |
trap 'rm -fr $tmp' 0 1 2 3 5 9 15 |
| 20 |
|
| 21 |
# Notice we're ignoring several tracepoints: |
| 22 |
# sys_enter_*/sys_exit_*: "virtual" tracepoints unusable by stap |
| 23 |
# hcall_entry/hcall_exit: ppc64-specific tracepoints that are on the |
| 24 |
# blocklist |
| 25 |
# ftrace:function: "virtual" tracepoint unusable by stap |
| 26 |
echo gathering perf tracepoint list |
| 27 |
${PERF-perf} list tracepoint | grep Tracepoint | grep -E -v 'sys_(enter|exit)_' \ |
| 28 |
| grep -E -v 'hcall_(entry|exit)'| grep -E -v 'ftrace:function' \ |
| 29 |
| awk '{print $1}' | sort > $tmp/perf |
| 30 |
perf_tracepoints=`wc -l $tmp/perf | cut -f1 -d' '` |
| 31 |
echo " perf found $perf_tracepoints tracepoints" |
| 32 |
|
| 33 |
echo gathering systemtap tracepoint list |
| 34 |
${STAP-stap} --poison-cache -L 'kernel.trace("*")' | cut -f2 -d'"' \ |
| 35 |
| sort > $tmp/stap |
| 36 |
stap_tracepoints=`wc -l $tmp/stap | cut -f1 -d' '` |
| 37 |
echo " stap found $stap_tracepoints tracepoints" |
| 38 |
|
| 39 |
echo listing tracepoints missing in stap |
| 40 |
echo |
| 41 |
comm ${COMM--23} $tmp/perf $tmp/stap |