summaryrefslogtreecommitdiffstats
path: root/testsuite/buildok
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2009-12-29 21:05:55 +0100
committerMark Wielaard <mjw@redhat.com>2009-12-29 22:16:35 +0100
commit11c015d84facc299ebcb12771ccda1975333a6bc (patch)
treec35ebd57d2e6338741d2d72e57a21fc192a1f929 /testsuite/buildok
parent8a0145d1019c5ac33a0d46e492cb381a06a015b9 (diff)
downloadsystemtap-steved-11c015d84facc299ebcb12771ccda1975333a6bc.tar.gz
systemtap-steved-11c015d84facc299ebcb12771ccda1975333a6bc.tar.xz
systemtap-steved-11c015d84facc299ebcb12771ccda1975333a6bc.zip
Fixup some memory tapset vm kernel function probe fallbacks.
Older kernels don't have all GFP constants defined, and the fallback kernel function probe fallbacks don't have the same dwarf variable names as the kernel trace point probes. So replace them with variables that are available. bytes_alloc was sometimes a long and sometimes a string, this caused scripts to fail depending on which alternative was chosen for a particular kernel. So make it a long always. This isn't a full solution since kmalloc is always inlined which makes the kernel.function("kmalloc").return probe fail. * tapset/memory.stp: Define __GFP_THISNODE, __GFP_RECLAIMABLE, GFP_TEMPORARY, GFP_HIGHUSER_MOVABLE and GFP_THISNODE when not yet defined. (__vm.kmalloc.kp): Use $flags, not $gfp_flags. Set bytes_alloc equal to bytes_req. (__vm.kmem_cache_alloc.kp): Likewise. And use $cachep->buffer_size for bytes_req. (__vm.kmalloc_node.kp): Likewise. (__vm.kmem_cache_alloc_node.kp): Likewise. (__vm.kfree.kp): Use $ibjp for ptr, not $return. (__vm.kmem_cache_free.kp): Likewise. * testsuite/buildok/vm.tracepoints.stp: Move vm.kmalloc test to... * testsuite/buildok/vm.tracepoints.kmalloc.stp: ... here.
Diffstat (limited to 'testsuite/buildok')
-rw-r--r--testsuite/buildok/vm.tracepoints.kmalloc.stp9
-rw-r--r--testsuite/buildok/vm.tracepoints.stp5
2 files changed, 10 insertions, 4 deletions
diff --git a/testsuite/buildok/vm.tracepoints.kmalloc.stp b/testsuite/buildok/vm.tracepoints.kmalloc.stp
new file mode 100644
index 00000000..f723737c
--- /dev/null
+++ b/testsuite/buildok/vm.tracepoints.kmalloc.stp
@@ -0,0 +1,9 @@
+#! stap -up4
+
+/* All other tracepoint memory probes are in another test vm.tracepoints.stp */
+
+probe vm.kmalloc {
+ println(name)
+ printf("%-15s %-15p %-15s %-15p %-15d %-15d %-15d %-15s \n", execname(), call_site, caller_function, ptr, bytes_req, bytes_alloc, gfp_flags, gfp_flag_name)
+}
+
diff --git a/testsuite/buildok/vm.tracepoints.stp b/testsuite/buildok/vm.tracepoints.stp
index 488ca0fc..6ed747d7 100644
--- a/testsuite/buildok/vm.tracepoints.stp
+++ b/testsuite/buildok/vm.tracepoints.stp
@@ -5,10 +5,7 @@ probe vm.kfree {
printf("%-15s %-15p %-15s %-15p \n", execname(), call_site, caller_function, ptr)
}
-probe vm.kmalloc {
- println(name)
- printf("%-15s %-15p %-15s %-15p %-15d %-15d %-15d %-15s \n", execname(), call_site, caller_function, ptr, bytes_req, bytes_alloc, gfp_flags, gfp_flag_name)
-}
+/* vm.kmalloc is in a separate test vm.tracepoints.kmalloc.stp */
probe vm.kmem_cache_alloc {
println(name)