]> sourceware.org Git - systemtap.git/commit
Fixup some memory tapset vm kernel function probe fallbacks.
authorMark Wielaard <mjw@redhat.com>
Tue, 29 Dec 2009 20:05:55 +0000 (21:05 +0100)
committerMark Wielaard <mjw@redhat.com>
Tue, 29 Dec 2009 21:16:35 +0000 (22:16 +0100)
commit11c015d84facc299ebcb12771ccda1975333a6bc
treec35ebd57d2e6338741d2d72e57a21fc192a1f929
parent8a0145d1019c5ac33a0d46e492cb381a06a015b9
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.
tapset/memory.stp
testsuite/buildok/vm.tracepoints.kmalloc.stp [new file with mode: 0644]
testsuite/buildok/vm.tracepoints.stp
This page took 0.493027 seconds and 5 git commands to generate.