This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: error to run systemtap in an ARM platform
On 07/25/11 03:03, Mark Wielaard wrote:
On Sat, 2011-07-23 at 15:55 -0700, Zheng Da wrote:
Hello,
I'm still trying to fix the problem.
semantic error: failed to retrieve return value location for vfs_write
(/build/tegra2_seaboard/tmp/portage/sys-kernel/chromeos-kernel-9999/work/chromeos-kernel-9999/fs/read_write.c):
identifier '$return' at read-write.stp:7:6
source: if ($return> 0) {
^
Is this the only probe for which return values aren't available or are
there others? What is your full script for triggering this issue?
I think it doesn't work at other probes either, but the translation
phase just stops here. The full script is as follow:
$ cat read-write.stp
#! /usr/bin/env stap
global write_by_pid;
global read_by_pid;
probe kernel.function("vfs_write").return {
if ($return > 0) {
write_by_pid[execname()] = $return
}
}
probe kernel.function("vfs_read").return {
if ($return > 0) {
read_by_pid[execname()] = $return
}
}
probe timer.s(10) {
foreach ([cmd] in write_by_pid-)
printf("%s writes %d bytes\n", cmd, write_by_pid[cmd])
foreach ([cmd] in read_by_pid-)
printf("%s reads %d bytes\n", cmd, read_by_pid[cmd])
exit()
}
I'm pretty sure CONFIG_DEBUG_INFO is enabled, and in
/build/tegra2_seaboard/tmp/portage/sys-kernel/chromeos-kernel-9999/work/chromeos-kernel-9999/build/tegra2_seaboard,
a binary file vmlinux is 57MB. It should contain the debug information.
Would you be able to upload this somewhere so we can inspect the debug
information? This looks like it is just the kernel image, not the
debuginfo, which is often bigger. You can see with stap -vvv what
systemtap is using. e.g.:
focused on module 'kernel' = [0x0xffffffff81000000,
-0x0xffffffff81e64000, bias 0x0
file /usr/lib/debug/lib/modules/2.6.35.13-92.fc14.x86_64/vmlinux ELF
machine |x86_64 (code 62)
focused on module 'kernel' = [0x0xc0008000, -0x0xc062c7dc, bias 0x0 file
/build/tegra2_seaboard/tmp/portage/sys-kernel/chromeos-kernel-9999/work/chromeos-kernel-9999/build/tegra2_seaboard/vmlinux
ELF machine arm*| (code 40)
$ ls -lh
/build/tegra2_seaboard/tmp/portage/sys-kernel/chromeos-kernel-9999/work/chromeos-kernel-9999/build/tegra2_seaboard/vmlinux
-rwxr-xr-x 1 zhengda portage 57M Jul 25 11:05
/build/tegra2_seaboard/tmp/portage/sys-kernel/chromeos-kernel-9999/work/chromeos-kernel-9999/build/tegra2_seaboard/vmlinux
You can download it from http://sharesend.com/download/agkdi
Thanks,
Da