Debian Codegraph @

testsuite/buildok/memory-detailed.stp

raw
1 #! stap -p4
2
3 probe vm.pagefault
4 {
5 printf("%s: %p %d\n", name, address, write_access)
6 }
7 probe vm.pagefault.return
8 {
9 printf("%s: %d\n", name, fault_type)
10 }
11
12 probe vm.write_shared
13 {
14 printf("%s: %p\n", name, address)
15 }
16
17 # vm.write_shared_copy test moved to memory-write_shared_copy.stp
18
19 # vm.mmap test moved to memory-mmap.stp
20
21 probe vm.munmap, vm.brk
22 {
23 printf("%s: %p %d\n", name, address, length)
24 }
25
26 probe vm.oom_kill
27 {
28 printf("%s: %p\n", name, task)
29 }
30
31 probe vm.kmalloc
32 {
33 printf("%s\n", name)
34 printf("%-15s %-15p %-15s %-15p %-15d %-15d %-15d %-15s\n",
35 execname(), call_site, caller_function, ptr, bytes_req,
36 bytes_alloc, gfp_flags, gfp_flag_name)
37 }
38
39 # Normally we don't test "internal" probes, but let's make sure the
40 # kprobes-based fallback probes actually work.
41
42 probe __vm.kmalloc.kp
43 {
44 printf("%-15s %-15p %-15s %-15p %-15d %-15d %-15d %-15s\n",
45 execname(), call_site, caller_function, ptr, bytes_req,
46 bytes_alloc, gfp_flags, gfp_flag_name)
47 }
48
49 probe vm.kmem_cache_alloc
50 {
51 println(name)
52 printf("%-15s %-15p %-15s %-15p %-15d %-15d %-15d %-15s \n",
53 execname(), call_site, caller_function, ptr, bytes_req,
54 bytes_alloc, gfp_flags, gfp_flag_name)
55 }
56 probe __vm.kmem_cache_alloc.kp
57 {
58 printf("%-15s %-15p %-15s %-15p %-15d %-15d %-15d %-15s \n",
59 execname(), call_site, caller_function, ptr, bytes_req,
60 bytes_alloc, gfp_flags, gfp_flag_name)
61 }
62
63 probe vm.kmalloc_node ?
64 {
65 println(name)
66 printf("%-15s %-15p %-15s %-15p %-15d %-15d %-15d %-15s \n",
67 execname(), call_site, caller_function, ptr, bytes_req,
68 bytes_alloc, gfp_flags, gfp_flag_name)
69 }
70 probe __vm.kmalloc_node.kp ?
71 {
72 printf("%-15s %-15p %-15s %-15p %-15d %-15d %-15d %-15s \n",
73 execname(), call_site, caller_function, ptr, bytes_req,
74 bytes_alloc, gfp_flags, gfp_flag_name)
75 }
76
77 probe vm.kmem_cache_alloc_node ?
78 {
79 println(name)
80 printf("%-15s %-15p %-15s %-15p %-15d %-15d %-15d %-15s \n",
81 execname(), call_site, caller_function, ptr, bytes_req,
82 bytes_alloc, gfp_flags, gfp_flag_name)
83 }
84 probe __vm.kmem_cache_alloc_node.kp ?
85 {
86 printf("%-15s %-15p %-15s %-15p %-15d %-15d %-15d %-15s \n",
87 execname(), call_site, caller_function, ptr, bytes_req,
88 bytes_alloc, gfp_flags, gfp_flag_name)
89 }
90
91 probe vm.kfree
92 {
93 println(name)
94 printf("%-15s %-15p %-15s %-15p \n", execname(), call_site,
95 caller_function, ptr)
96 }
97 probe __vm.kfree.kp
98 {
99 printf("%-15s %-15p %-15s %-15p \n", execname(), call_site,
100 caller_function, ptr)
101 }
102
103 probe vm.kmem_cache_free {
104 println(name)
105 printf("%-15s %-15p %-15s %-15p \n", execname(), call_site,
106 caller_function, ptr)
107 }
108 probe __vm.kmem_cache_free.kp {
109 printf("%-15s %-15p %-15s %-15p \n", execname(), call_site,
110 caller_function, ptr)
111 }