This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
RE: $return in wildcarded void functions
- From: "John Liang" <jliang at ibrix dot com>
- To: <systemtap at sources dot redhat dot com>
- Date: Wed, 7 Mar 2007 11:35:01 -0500
- Subject: RE: $return in wildcarded void functions
- References: <45ECC45B.4080809@us.ibm.com>
HI There,
I tried to use $return with systemtap 0.5.4. It seems
$return is not supported or I did something wrong here?
[]# stap -V
SystemTap translator/driver (version 0.5.4 built 2006-02-02)
Copyright (C) 2005-2006 Red Hat, Inc. and others
This is free software; see the source for copying conditions
probe kernel.function("d_lookup").return
{
if($return)
missedcnt++
}
[]# ./cache.stp
semantic error: target variables not available to .return probes
semantic error: no match for probe point
while: resolving probe point kernel.function("d_lookup").return
Pass 2: analysis failed. Try again with '-v' (verbose) option.
Thanks,
--
John Liang
-----Original Message-----
From: systemtap-owner@sourceware.org [mailto:systemtap-owner@sourceware.org]
On Behalf Of Mike Mason
Sent: Monday, March 05, 2007 8:31 PM
To: systemtap@sources.redhat.com
Subject: $return in wildcarded void functions
A co-worker posed this problem... He's debugging code he's not familiar
with. He's using wildcarding to probe the entries and exits of all
functions in a specific module. The return probe looks something like this:
probe module("uhci_hcd").function("*").return
{
printf ("%s <- %s: %s\n", thread_indent(-2), probefunc(),
errno_str($return))
}
The return probe attempts to access $return. For functions defined as void,
obviously there is no return value, which causes pass 2 to fail with the
following errors:
semantic error: function has no return value: identifier '$return' at
usb2:11:85
semantic error: function has no return value: identifier '$return' at
usb2:23:85
Is there any way around this problem short of writing a return probe for
each function? Is there any way to treat a variable as conditional? That
would be a useful feature, especially for wildcarded return probes.
Mike