* ocfs2 functions probe not working like ext4 ones ?
@ 2010-01-25 11:42 Damien HARDY
2010-01-25 12:13 ` Mark Wielaard
2010-01-25 12:13 ` Eugeniy Meshcheryakov
0 siblings, 2 replies; 6+ messages in thread
From: Damien HARDY @ 2010-01-25 11:42 UTC (permalink / raw)
To: systemtap
Hello,
My Project is to log the fs changes on a drbd device to manage eventual
split-brain (each side is an autonome master during network link
interruption), by merging modifications from one side to other based on
a changelog (file deleted|created|modified) and discard first side
changes to resync with the other.
So I try to do some changelog for some filesystem under ocfs2.
I add probe on the function "ocfs2_create" in the file
"fs/ocfs2/namei.c" to log creation of a new file.
Here is my simple script :
#!/usr/bin/env stap
probe begin {
print ("Log Start\n")
}
#probe kernel.function("ext4_create@fs/ext4/namei.c") {
probe kernel.function("ocfs2_create@fs/ocfs2/namei.c") {
name = $dentry->d_name->name
printf ("%s \n", kernel_string(name))
}
probe end {
print ("log End\n")
}
###END OF SCRIPT
When I execute this script I get the error :
semantic error: no match while resolving probe point
kernel.function("ocfs2_create@fs/ocfs2/namei.c")
I have done some test for ext4 based filesystem and the analog script
work well ... I get the name of the file "test" I created on the ext4
filesystem.
Log Start
test
log End
What did I miss ?
Thank you for your answers.
--
Damien
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ocfs2 functions probe not working like ext4 ones ?
2010-01-25 11:42 ocfs2 functions probe not working like ext4 ones ? Damien HARDY
@ 2010-01-25 12:13 ` Mark Wielaard
2010-01-25 13:05 ` RE : " Damien HARDY
2010-01-25 12:13 ` Eugeniy Meshcheryakov
1 sibling, 1 reply; 6+ messages in thread
From: Mark Wielaard @ 2010-01-25 12:13 UTC (permalink / raw)
To: Damien HARDY; +Cc: systemtap
On Mon, 2010-01-25 at 12:41 +0100, Damien HARDY wrote:
> So I try to do some changelog for some filesystem under ocfs2.
> I add probe on the function "ocfs2_create" in the file
> "fs/ocfs2/namei.c" to log creation of a new file.
> [...]
> When I execute this script I get the error :
> semantic error: no match while resolving probe point
> kernel.function("ocfs2_create@fs/ocfs2/namei.c")
>
> I have done some test for ext4 based filesystem and the analog script
> work well ... I get the name of the file "test" I created on the ext4
> filesystem.
The difference might be that ext4 is compiled into the kernel, but ocfs2
is build as a module. If so change kernel.function to module.function:
probe module.function("ocfs2_create@fs/ocfs2/namei.c")
Also, you don't need to give the source file name explicitly, stap
should be able to figure that out itself:
probe module.function("ocfs2_create")
Cheers,
Mark
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE : ocfs2 functions probe not working like ext4 ones ?
2010-01-25 12:13 ` Mark Wielaard
@ 2010-01-25 13:05 ` Damien HARDY
2010-01-25 15:04 ` Eugeniy Meshcheryakov
0 siblings, 1 reply; 6+ messages in thread
From: Damien HARDY @ 2010-01-25 13:05 UTC (permalink / raw)
Cc: systemtap
________________________________________
De : Mark Wielaard [mjw@redhat.com]
Date d'envoi : lundi 25 janvier 2010 13:13
À : Damien HARDY
Cc : systemtap@sources.redhat.com
Objet : Re: ocfs2 functions probe not working like ext4 ones ?
> > On Mon, 2010-01-25 at 12:41 +0100, Damien HARDY wrote:
> > So I try to do some changelog for some filesystem under ocfs2.
> > I add probe on the function "ocfs2_create" in the file
> > "fs/ocfs2/namei.c" to log creation of a new file.
> > [...]
> > When I execute this script I get the error :
> > semantic error: no match while resolving probe point
> > kernel.function("ocfs2_create@fs/ocfs2/namei.c")
> >
> > I have done some test for ext4 based filesystem and the analog script
> > work well ... I get the name of the file "test" I created on the ext4
> > filesystem.
> The difference might be that ext4 is compiled into the kernel, but ocfs2
> is build as a module. If so change kernel.function to module.function:
> probe module.function("ocfs2_create@fs/ocfs2/namei.c")
> Also, you don't need to give the source file name explicitly, stap
> should be able to figure that out itself:
> probe module.function("ocfs2_create")
> Cheers,
> Mark
Thank you for answers Mark and Eugeniy,
I change my script with :
probe module("ocfs2").function("ocfs2_create")
Now the error is :
WARNING: cannot find module ocfs2 debuginfo: No DWARF information found
semantic error: no match while resolving probe point module("ocfs2").function("ocfs2_create")
I run on ubuntu 9.10, kernel recompiled (default options, just creation of /CurrentlyBuilding) to get the "debug" kernel image :
root@acblock01:~# dpkg -l linux-image* | grep `uname -r`
ii linux-image-2.6.31-17-server 2.6.31-17.54 Linux kernel image for version 2.6.31 on x86
ii linux-image-debug-2.6.31-17-server 2.6.31-17.54 Linux kernel debug image for version 2.6.31
the linux-image-debug contains files about ocfs2 :
root@acblock01:~# dpkg -L linux-image-debug-2.6.31-17-server | grep ocfs2
/usr/lib/debug/lib/modules/2.6.31-17-server/kernel/fs/ocfs2
/usr/lib/debug/lib/modules/2.6.31-17-server/kernel/fs/ocfs2/ocfs2_stackglue.ko
/usr/lib/debug/lib/modules/2.6.31-17-server/kernel/fs/ocfs2/dlm
/usr/lib/debug/lib/modules/2.6.31-17-server/kernel/fs/ocfs2/dlm/ocfs2_dlmfs.ko
/usr/lib/debug/lib/modules/2.6.31-17-server/kernel/fs/ocfs2/dlm/ocfs2_dlm.ko
/usr/lib/debug/lib/modules/2.6.31-17-server/kernel/fs/ocfs2/ocfs2_stack_o2cb.ko
/usr/lib/debug/lib/modules/2.6.31-17-server/kernel/fs/ocfs2/cluster
/usr/lib/debug/lib/modules/2.6.31-17-server/kernel/fs/ocfs2/cluster/ocfs2_nodemanager.ko
/usr/lib/debug/lib/modules/2.6.31-17-server/kernel/fs/ocfs2/ocfs2.ko
/usr/lib/debug/lib/modules/2.6.31-17-server/kernel/fs/ocfs2/ocfs2_stack_user.ko
What's wrong ?
Cheers
--
Damien
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: RE : ocfs2 functions probe not working like ext4 ones ?
2010-01-25 13:05 ` RE : " Damien HARDY
@ 2010-01-25 15:04 ` Eugeniy Meshcheryakov
2010-01-25 16:15 ` RE : " Damien HARDY
0 siblings, 1 reply; 6+ messages in thread
From: Eugeniy Meshcheryakov @ 2010-01-25 15:04 UTC (permalink / raw)
To: Damien HARDY; +Cc: systemtap
[-- Attachment #1: Type: text/plain, Size: 1826 bytes --]
25 січня 2010 о 14:01 +0100 Damien HARDY написав(-ла):
> I run on ubuntu 9.10, kernel recompiled (default options, just creation of /CurrentlyBuilding) to get the "debug" kernel image :
> root@acblock01:~# dpkg -l linux-image* | grep `uname -r`
> ii linux-image-2.6.31-17-server 2.6.31-17.54 Linux kernel image for version 2.6.31 on x86
> ii linux-image-debug-2.6.31-17-server 2.6.31-17.54 Linux kernel debug image for version 2.6.31
>
> the linux-image-debug contains files about ocfs2 :
> root@acblock01:~# dpkg -L linux-image-debug-2.6.31-17-server | grep ocfs2
> /usr/lib/debug/lib/modules/2.6.31-17-server/kernel/fs/ocfs2
> /usr/lib/debug/lib/modules/2.6.31-17-server/kernel/fs/ocfs2/ocfs2_stackglue.ko
> /usr/lib/debug/lib/modules/2.6.31-17-server/kernel/fs/ocfs2/dlm
> /usr/lib/debug/lib/modules/2.6.31-17-server/kernel/fs/ocfs2/dlm/ocfs2_dlmfs.ko
> /usr/lib/debug/lib/modules/2.6.31-17-server/kernel/fs/ocfs2/dlm/ocfs2_dlm.ko
> /usr/lib/debug/lib/modules/2.6.31-17-server/kernel/fs/ocfs2/ocfs2_stack_o2cb.ko
> /usr/lib/debug/lib/modules/2.6.31-17-server/kernel/fs/ocfs2/cluster
> /usr/lib/debug/lib/modules/2.6.31-17-server/kernel/fs/ocfs2/cluster/ocfs2_nodemanager.ko
> /usr/lib/debug/lib/modules/2.6.31-17-server/kernel/fs/ocfs2/ocfs2.ko
> /usr/lib/debug/lib/modules/2.6.31-17-server/kernel/fs/ocfs2/ocfs2_stack_user.ko
>
> What's wrong ?
>
There are several problems with elfutils related to separate debuginfo for kernel
modules (Debian bugs #555549, #556133). Workaround for one of them is to set environment
variable SYSTEMTAP_DEBUGINFO_PATH to "/usr/lib/debug", for example. The
other one can be fixed applying patch from
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=556133 .
Regards,
Eugeniy Meshcheryakov
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE : RE : ocfs2 functions probe not working like ext4 ones ?
2010-01-25 15:04 ` Eugeniy Meshcheryakov
@ 2010-01-25 16:15 ` Damien HARDY
0 siblings, 0 replies; 6+ messages in thread
From: Damien HARDY @ 2010-01-25 16:15 UTC (permalink / raw)
Cc: systemtap
________________________________________
De : Eugeniy Meshcheryakov [eugen@debian.org]
Date d'envoi : lundi 25 janvier 2010 16:03
À : Damien HARDY
Cc : systemtap@sources.redhat.com
Objet : Re: RE : ocfs2 functions probe not working like ext4 ones ?
> 25 січня 2010 о 14:01 +0100 Damien HARDY написав(-ла):
> > I run on ubuntu 9.10, kernel recompiled (default options, just creation of /CurrentlyBuilding) to get the "debug" kernel image :
> > root@acblock01:~# dpkg -l linux-image* | grep `uname -r`
> > ii linux-image-2.6.31-17-server 2.6.31-17.54 Linux kernel image for version 2.6.31 on x86
> > ii linux-image-debug-2.6.31-17-server 2.6.31-17.54 Linux kernel debug image for version 2.6.31
> >
> > the linux-image-debug contains files about ocfs2 :
> > root@acblock01:~# dpkg -L linux-image-debug-2.6.31-17-server | grep ocfs2
> > /usr/lib/debug/lib/modules/2.6.31-17-server/kernel/fs/ocfs2
> > /usr/lib/debug/lib/modules/2.6.31-17-server/kernel/fs/ocfs2/ocfs2_stackglue.ko
> > /usr/lib/debug/lib/modules/2.6.31-17-server/kernel/fs/ocfs2/dlm
> > /usr/lib/debug/lib/modules/2.6.31-17-server/kernel/fs/ocfs2/dlm/ocfs2_dlmfs.ko
> > /usr/lib/debug/lib/modules/2.6.31-17-server/kernel/fs/ocfs2/dlm/ocfs2_dlm.ko
> > /usr/lib/debug/lib/modules/2.6.31-17-server/kernel/fs/ocfs2/ocfs2_stack_o2cb.ko
> > /usr/lib/debug/lib/modules/2.6.31-17-server/kernel/fs/ocfs2/cluster
> > /usr/lib/debug/lib/modules/2.6.31-17-server/kernel/fs/ocfs2/cluster/ocfs2_nodemanager.ko
> > /usr/lib/debug/lib/modules/2.6.31-17-server/kernel/fs/ocfs2/ocfs2.ko
> > /usr/lib/debug/lib/modules/2.6.31-17-server/kernel/fs/ocfs2/ocfs2_stack_user.ko
> >
> > What's wrong ?
> >
> There are several problems with elfutils related to separate debuginfo for kernel
> modules (Debian bugs #555549, #556133). Workaround for one of them is to set environment
> variable SYSTEMTAP_DEBUGINFO_PATH to "/usr/lib/debug", for example. The
> other one can be fixed applying patch from
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=556133 .
> Regards,
> Eugeniy Meshcheryakov
the EnvVar does not change anythings :
WARNING: cannot find module ocfs2 debuginfo: No DWARF information found
semantic error: no match while resolving probe point module("ocfs2").function("ocfs2_create")
I want to avoid patching my kernel and differ from the one provide by Canonical.
So my idea of an "fschangelog" is a bit too early I have to wait for fanotify from Eriic Paris using fsnotify (the API is allready in my kernel 2.6.31, but not fully usable for a whole fs with inotify, /o\ frustrating)
However thank you for the help,
Regards,
--
Damien
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ocfs2 functions probe not working like ext4 ones ?
2010-01-25 11:42 ocfs2 functions probe not working like ext4 ones ? Damien HARDY
2010-01-25 12:13 ` Mark Wielaard
@ 2010-01-25 12:13 ` Eugeniy Meshcheryakov
1 sibling, 0 replies; 6+ messages in thread
From: Eugeniy Meshcheryakov @ 2010-01-25 12:13 UTC (permalink / raw)
To: Damien HARDY; +Cc: systemtap
[-- Attachment #1: Type: text/plain, Size: 284 bytes --]
Hello,
25 січня 2010 о 12:41 +0100 Damien HARDY написав(-ла):
> What did I miss ?
>
Your script looks correct, but maybe you have ocfs2 compiled as module
unlike ext4? Then you may want to change "kernel" to module("ocfs2").
Regards,
Eugeniy Meshcheryakov
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-01-25 16:15 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-25 11:42 ocfs2 functions probe not working like ext4 ones ? Damien HARDY
2010-01-25 12:13 ` Mark Wielaard
2010-01-25 13:05 ` RE : " Damien HARDY
2010-01-25 15:04 ` Eugeniy Meshcheryakov
2010-01-25 16:15 ` RE : " Damien HARDY
2010-01-25 12:13 ` Eugeniy Meshcheryakov
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).