Debian Codegraph @

testsuite/systemtap.examples/general/sizeof_interactive.stp

raw
1 #! /usr/bin/env stap
2
3 # Usage:
4 # TYPENAME
5 # TYPENAME kernelmodule
6 # TYPENAME /usr/bin/executable
7 # TYPENAME kernel<include/linux/someheader.h>
8 # TYPENAME </usr/include/someheader.h>
9
10 global cmd = " 'probe oneshot { println(\"type \", @1, %( $# > 1 %? \" in \", @2, %) \" byte-size: \", %( $# > 1 %? @cast_module_sizeof(@2, @1) %: @cast_sizeof(@1) %)) }' "
11
12 probe begin {
13 println("Ready")
14 }
15
16 probe input.char {
17 print(char)
18 }
19
20 probe input.line {
21 if (tokenize(line, " \n") == "") next
22 system("stap -e" . cmd . line)
23 }