public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* Disappearing return value
@ 2007-09-27  0:41 Mike Mason
  2007-09-27 15:29 ` Stone, Joshua I
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Mason @ 2007-09-27  0:41 UTC (permalink / raw)
  To: systemTAP

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-09-27  7:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-27  0:41 Disappearing return value Mike Mason
2007-09-27 15:29 ` Stone, Joshua I
2007-09-27 17:51   ` Roland McGrath

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).