Debian Codegraph @

tapset/linux/powerpc/sysc_ipc.stp

raw
1 %( systemtap_v <= "2.7" %?
2 # sys32_ipc() is just a syscall multiplexer (similar to
3 # sys_socketcall()). So, we don't really need to probe it, since we'll
4 # be probing what sys32_ipc() will call (semget, msgsnd, msgrcv,
5 # shmat, etc.).
6
7 # ipc ________________________________________
8 #
9 # long sys32_ipc(u32 call, u32 first, u32 second, u32 third,
10 # compat_uptr_t ptr, u32 fifth)
11 #
12
13 @define _SYSCALL_IPC_NAME
14 %(
15 name = "ipc"
16 %)
17
18 @define _SYSCALL_IPC_ARGSTR
19 %(
20 argstr = sprintf("%d, %d, %d, %d, %p, %d", call, first, second,
21 third, ptr, fifth)
22 %)
23
24 probe syscall.ipc = dw_syscall.ipc !, nd_syscall.ipc ? {}
25 probe syscall.ipc.return = dw_syscall.ipc.return !, nd_syscall.ipc.return ? {}
26
27 # dw_ipc _____________________________________________________
28
29 probe dw_syscall.ipc = kernel.function("sys32_ipc") ?
30 {
31 @_SYSCALL_IPC_NAME
32 call = $call
33 first = $first
34 second = $second
35 third = $third
36 ptr = $ptr
37 fifth = $fifth
38 @_SYSCALL_IPC_ARGSTR
39 }
40 probe dw_syscall.ipc.return = kernel.function("sys32_ipc").return ?
41 {
42 @_SYSCALL_IPC_NAME
43 @SYSC_RETVALSTR($return)
44 }
45
46 # nd_ipc _____________________________________________________
47
48 probe nd_syscall.ipc = kprobe.function("sys32_ipc") ?
49 {
50 @_SYSCALL_IPC_NAME
51 asmlinkage()
52 call = uint_arg(1)
53 first = uint_arg(2)
54 second = uint_arg(3)
55 third = uint_arg(4)
56 ptr = uint_arg(5)
57 fifth = uint_arg(6)
58 @_SYSCALL_IPC_ARGSTR
59 }
60 probe nd_syscall.ipc.return = kprobe.function("sys32_ipc").return ?
61 {
62 @_SYSCALL_IPC_NAME
63 @SYSC_RETVALSTR(returnval())
64 }
65 %)