This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Linux Kernel GDB tracepoint module 2010-8-30 release
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: Steven <mqyoung at gmail dot com>
- Cc: Hui Zhu <teawater at gmail dot com>, "gdb at sourceware dot org" <gdb at sourceware dot org>, linux-kernel at vger dot kernel dot org, Michael Snyder <msnyder at vmware dot com>, Marc Khouzam <marc dot khouzam at ericsson dot com>, Thiago Jung Bauermann <thiago dot bauermann at gmail dot com>
- Date: Fri, 03 Sep 2010 10:05:56 -0400
- Subject: Re: Linux Kernel GDB tracepoint module 2010-8-30 release
- References: <AANLkTimjO7sBzR55XkPB7dmZvxXqc8PS4UDsgptXVt90@mail.gmail.com> <1283504768.2100.43.camel@steven>
Steven <mqyoung@gmail.com> writes:
> [...]
> (gdb) trace vfs_readdir
> Tracepoint 3 at 0xc1175690: file fs/readdir.c, line 23.
> (gdb) actions
> Enter actions for tracepoint 3, one per line.
> End with a line saying just "end".
> > collect jiffies_64
> > collect *file
> > end
By the way, the systemtap equivalent would be:
#! /usr/bin/stap -g
probe kernel.function("vfs_readdir") {
println(%{ jiffies_64 %})
println($file$)
}
> 2) I can not collect local variable, despite I rebuild the kernel with
> -O0 optimization option. what is the problem? Many thanks
> -------------------------------------------------------------------
> (gdb) trace fs/readdir.c:29
> Tracepoint 2 at 0xc11756ca: file fs/readdir.c, line 29.
> (gdb) actions
> Enter actions for tracepoint 2, one per line.
> End with a line saying just "end".
> > collect res
> > end
#! /usr/bin/stap
probe kernel.statement("*@fs/readdir.c:29") {
println($res)
}
- FChE