This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
unresolved type-semantic error
- From: naresh kamboju <naresh dot kernel at gmail dot com>
- To: systemtap at sources dot redhat dot com
- Cc: "Frank Ch. Eigler" <fche at redhat dot com>, Masami Hiramatsu <mhiramat at redhat dot com>, David Smith <dsmith at redhat dot com>, Dave Brolley <brolley at redhat dot com>, David Howells <dhowells at redhat dot com>, ananth at in dot ibm dot com
- Date: Mon, 7 Dec 2009 21:06:03 +0530
- Subject: unresolved type-semantic error
Hi,
I have come across with semantic errors in the SystemTap testsuite
while building test cases.
/*************************************************************/
File: tapset/signal.stp
/*************************************************************/
probe signal.handle = kernel.function("handle_signal")
{
sig = $sig
sig_name = _signal_name($sig)
.
.
// Check whether the signal is a User Mode or Kernel mode Signal.
if (sinfo == 0 && sig_code <= 0)
sig_mode = "User Mode Signal"
else if (sinfo >= 1)
sig_mode = "Kernel Mode Signal"
}
probe signal.handle.return = kernel.function("handle_signal").return ?
{
retstr = returnstr(1)
}
/*************************************************************/
build log
/*************************************************************/
semantic error: failed to retrieve return value location for
copy_process(kernel/fork.c): identifier '$return' at
/usr/local/arm/devel/share/systemtap/tapset/kprocess.stp:28:12
source: task = $return
^
semantic error: failed to retrieve return value location for
do_execve(fs/exec.c): identifier '$return' at :78:13
source: errno = $return
^
semantic error: not accessible at this address (0x80025c5c):
identifier '$sig' at
/usr/local/arm/devel/share/systemtap/tapset/signal.stp:526:11
source: sig = $sig
^
semantic error: not accessible at this address (0x80025c5c):
identifier '$sig' at :527:29
source: sig_name = _signal_name($sig)
^
semantic error: probe_1813 with unresolved type: identifier 'sig' at
/usr/local/arm/devel/share/systemtap/tapset/signal.stp:526:5
source: sig = $sig
^
semantic error: probe_1813 with unresolved type: identifier 'sig' at
process_test.stp:43:14
source: log(sprint(sig))
^
semantic error: probe_1813 with unresolved type: identifier 'sprint' at :43:7
source: log(sprint(sig))
^
semantic error: probe_1813 with unresolved type: identifier 'log' at :43:3
source: log(sprint(sig))
^
Pass 2: analyzed script: 11 probe(s), 16 function(s), 16 embed(s), 0
global(s) in 230usr/50sys/289real ms.
Pass 2: analysis failed. Try again with another '--vp 01' option.
Keeping temporary directory "/tmp/stapFqPOLz"
/*************************************************************/
This symbol is not present in the Kernel
#nm vmlinux | grep "handle_signal"
<< nothing related to handle_signal >>
/*************************************************************/
I have made the following changes to Kernel make test work
make global and Export:
------------------------------------------------------------------------------------
Index: b/arch/arm/kernel/signal.c
===================================================================
--- a/arch/arm/kernel/signal.c
+++ b/arch/arm/kernel/signal.c
@@ -584,8 +584,14 @@ struct arm_abi arm_abi = {
.restart = __NR_restart_syscall
};
+#if 0
static int handle_signal(unsigned long sig, siginfo_t *info,
struct k_sigaction *ka, sigset_t *oldset, struct pt_regs *regs)
+#else
+#include <linux/module.h>
+int handle_signal(unsigned long sig, siginfo_t *info,
+ struct k_sigaction *ka, sigset_t *oldset, struct pt_regs *regs)
+#endif
{
int ret;
@@ -621,6 +627,7 @@ static int handle_signal(unsigned long s
return ret;
}
+EXPORT_SYMBOL(handle_signal);
static void do_signal(struct pt_regs *regs)
{
/*************************************************************/
I can say that the above method is not the best way to fix the issues.
I have notices much these kinds of issues almost 70+ test cases.
I have tested with systemtap-0.9.5 … systemtap-1.0.
All these are expected failures?
If not,
Do we need to fix these issues at SystemTap or Kernel side?
Best regards
Naresh Kamboju