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]

Disappearing return value


I'm trying to probe the following function:

static int nfs_check_flags(int flags)
{
       if ((flags & (O_APPEND | O_DIRECT)) == (O_APPEND | O_DIRECT))
               return -EINVAL;

       return 0;
}

with this script:

probe kernel.function("nfs_check_flags").return ?,
     module("nfs").function("nfs_check_flags").return ?
{
       ret = $return
}

and seeing these errors:

Pass 1: parsed user script and 37 library script(s) in 210usr/10sys/222real ms.
probe nfs_check_flags@?:-1 module=nfs reloc=.text section=.text pc=0x5ef19e0
semantic error: function has no return value: identifier '$return' at nfs2.stp:4:8
semantic error: probe_1060 with unresolved type: identifier 'ret' at nfs2.stp:4:2
Pass 2: analyzed script: 1 probe(s), 0 function(s), 0 embed(s), 0 global(s) in 250usr/100sys/348real ms.
Pass 2: analysis failed.  Try again with more '-v' (verbose) options.

nfs_check_flags() looks like a candidate for inlining during optimization, but then I'd expect an error indicating no return probe could be set. Is this a known problem?

Mike


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