This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: probing based on kernel source
- From: Wenji Huang <wenji dot huang at oracle dot com>
- To: Jun Koi <junkoi2004 at gmail dot com>
- Cc: SystemTAP <systemtap at sources dot redhat dot com>
- Date: Tue, 09 Sep 2008 12:47:14 +0800
- Subject: Re: probing based on kernel source
- References: <fdaac4d50809082146ud8ebad0yda278548e937437a@mail.gmail.com>
- Reply-to: wenji dot huang at oracle dot com
Jun Koi wrote:
Hi,
Is it possible to probe a place coresponding to a particular line of a
particular file in Linux kernel souce code? If so, what is the syntax?
Thanks a lot,
Jun
See reference
http://sourceware.org/systemtap/langref/
4.2.2 kernel.statement, module().statement
The .statement variant places a probe at the exact spot, exposing those
local variables that are visible there.
General syntax:
kernel.statement("func@file:linenumber")
module("modname").statement("func@file:linenumber")
Example:
# Refers to the statement at line 2917 within the
# kernel/sched.c file:
kernel.statement("*@kernel/sched.c:2917")
Regards,
Wenji