* systemtap tracepoint support
@ 2009-03-07 8:39 Josh Stone
2009-03-07 16:45 ` Frank Ch. Eigler
0 siblings, 1 reply; 3+ messages in thread
From: Josh Stone @ 2009-03-07 8:39 UTC (permalink / raw)
To: systemtap
Hi All,
I just pushed out support for kernel tracepoints in systemtap -- a copy
of the manpage section is included below for reference. Try this
command to see what's available in your kernel:
stap -l 'kernel.trace("*")'
On Fedora rawhide, the kernel does have tracepoints enabled, but the
kernel-devel package is missing the headers needed to define the
tracepoints. This has been fixed in the package spec now, so the next
kernel package should be ready to go. If you're impatient, you can also
grab the source rpm and copy include/trace into
/usr/src/kernels/$(uname -r)/include/trace/.
RHEL5 U3 also contains tracepoints, and is also missing the headers from
kernel-devel. Again, copying the files from the source RPM should let
you use them now. I don't have an ETA for when the official package
might be updated though...
For other distributions or custom kernels, YMMV, but anything 2.6.28+
should have at least a few tracepoints available.
As always, any feedback is welcome...
Thanks,
Josh
TRACEPOINTS
This family of probe points hooks up to static probing trace-
points inserted into the kernel or modules. As with markers,
these tracepoints are special macro calls inserted by kernel de-
velopers to make probing faster and more reliable than with
DWARF-based probes, and DWARF debugging information is not re-
quired to probe tracepoints. Tracepoints have an extra advan-
tage of more strongly-typed parameters than markers.
Tracepoint probes begin with kernel. The next part names the
tracepoint itself: trace("name"). The tracepoint name string,
which may contain the usual wildcard characters, is matched
against the names defined by the kernel developers in the trace-
point header files.
The handler associated with a tracepoint-based probe may read
the optional parameters specified at the macro call site. These
are named according to the declaration by the tracepoint author.
For example, the tracepoint probe kernel.trace("sched_switch")
provides the parameters $rq, $prev, and $next. If the parameter
is a complex type, as in a struct pointer, then a script can ac-
cess fields with the same syntax as DWARF $target variables.
Also, tracepoint parameters cannot be modified, but in guru-mode
a script may modify fields of parameters.
The name of the tracepoint is available in $$name, and a string
of name=value pairs for all parameters of the tracepoint is
available in $$vars.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: systemtap tracepoint support
2009-03-07 8:39 systemtap tracepoint support Josh Stone
@ 2009-03-07 16:45 ` Frank Ch. Eigler
0 siblings, 0 replies; 3+ messages in thread
From: Frank Ch. Eigler @ 2009-03-07 16:45 UTC (permalink / raw)
To: Josh Stone; +Cc: systemtap
jistone wrote:
> I just pushed out support for kernel tracepoints in systemtap [...]
Nice job!
> [...] The name of the tracepoint is available in $$name, and a
> string of name=value pairs for all parameters of the tracepoint is
> available in $$vars.
($$parms could be another alias for consistency with kprobes.)
- FChE
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: systemtap tracepoint support
[not found] ` <200903102101543280307@cse.buaa.edu.cn>
@ 2009-03-11 19:59 ` Josh Stone
0 siblings, 0 replies; 3+ messages in thread
From: Josh Stone @ 2009-03-11 19:59 UTC (permalink / raw)
To: zshan; +Cc: systemtap
zshan wrote:
> 2.6.18 is my kernel version ,and my system is rhel 5.2
The RHEL 5.2 kernel does not have any tracepoints. If you can update to
RHEL 5.3, then you'll get 17 available tracepoints in the scheduler and
irq subsystems.
Josh
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-03-10 18:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-07 8:39 systemtap tracepoint support Josh Stone
2009-03-07 16:45 ` Frank Ch. Eigler
[not found] <935392725.111941236576308852.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com>
[not found] ` <200903102101543280307@cse.buaa.edu.cn>
2009-03-11 19:59 ` Josh Stone
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).