File: tracepoint-diff

package info (click to toggle)
systemtap 5.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 47,556 kB
  • sloc: cpp: 81,117; ansic: 54,933; xml: 49,795; exp: 43,595; sh: 11,526; python: 5,003; perl: 2,252; tcl: 1,312; makefile: 1,006; javascript: 149; lisp: 105; awk: 101; asm: 91; java: 70; sed: 16
file content (41 lines) | stat: -rwxr-xr-x 1,257 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#! /bin/sh

echo checking running as root
if [ `whoami` != "root" ]; then
   echo run as root
   exit 1
fi

echo checking /sys/kernel/debug mounted
if test -d /sys/kernel/debug/tracing/events
then
        true
else
        mount -t debugfs /dev/null /sys/kernel/debug
fi

tmp=`mktemp -d`
echo made work directory $tmp
trap 'rm -fr $tmp' 0 1 2 3 5 9 15

# Notice we're ignoring several tracepoints:
#  sys_enter_*/sys_exit_*: "virtual" tracepoints unusable by stap
#  hcall_entry/hcall_exit: ppc64-specific tracepoints that are on the
#    blocklist
#  ftrace:function: "virtual" tracepoint unusable by stap
echo gathering perf tracepoint list
${PERF-perf} list tracepoint | grep Tracepoint | grep -E -v 'sys_(enter|exit)_' \
    | grep -E -v 'hcall_(entry|exit)'| grep -E -v 'ftrace:function' \
    | awk '{print $1}' | sort > $tmp/perf
perf_tracepoints=`wc -l $tmp/perf | cut -f1 -d' '`
echo "  perf found $perf_tracepoints tracepoints"

echo gathering systemtap tracepoint list
${STAP-stap} --poison-cache -L 'kernel.trace("*")' | cut -f2 -d'"' \
    | sort > $tmp/stap
stap_tracepoints=`wc -l $tmp/stap | cut -f1 -d' '`
echo "  stap found $stap_tracepoints tracepoints"

echo listing tracepoints missing in stap
echo
comm ${COMM--23} $tmp/perf $tmp/stap