This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tapsets/11551] New: kprobes-based memory probe fallback for tracepoint-based probes doesn't work


Commit d5d6f6 added some tracepoint-based memory probes to memory.stp, with
kprobes-based fallback probes (in case the kernel doesn't have tracepoints). 
However, the kprobe-based fallbacks are broken on all kernels.  

Here's the kprobes-based fallback probe:

probe __vm.kmalloc.kp = kernel.function("kmalloc").return {                     
        name = "kmalloc"                                                        
        call_site = 0                                                           
        caller_function = "unknown"                                             
        bytes_req = $size                                                       
        bytes_alloc = bytes_req // pretend they are always the same             
        gfp_flags = $flags                                                      
        gfp_flag_name = __gfp_flag_str(gfp_flags)                               
        ptr = $return                                                           
}                                                                               

Here's the declaration of kmalloc from 

static __always_inline void *kmalloc(size_t size, gfp_t flags)                  
{                                                                               
...                           
}  

Since kmalloc is inlined, you can't put a kretprobe on it.  Even if that were
possible, because of bug #1155 the following kernels can't see the inlined
function arguments: RHEL4 (2.6.9-89.0.20.EL), RHEL5 (2.6.18-186.el5), and
rawhide (2.6.34-0.38.rc5.git0.fc14.x86_64).

A different kprobes-based fallback needs to be found.

-- 
           Summary: kprobes-based memory probe fallback for tracepoint-based
                    probes doesn't work
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tapsets
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: dsmith at redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=11551

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]