[lkml]   [2008]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [patch 34/37] LTTng instrumentation ipc
Hi -

On Mon, May 05, 2008 at 01:04:33AM +0400, Alexey Dobriyan wrote:
> [...]
> > for the rest, a way that would not export too much information about
> > kernel's internals :
> >
> > trace_mark(shm_start, "is_shm_fop %d file %p",
> > file->f_op == &shm_file_operations, file);
> And this is totally unexpected from you.
> In the name of bug-free kernel,
> And I perfectly know which ones at which spots!

You as (or having the ear of) a subsystem maintainer can make that
judgement. If your marker is more of a low-level field diagnostic
sort of thing, feel free to pass the most appropriate values - even
binary dumps of things. An end user will not normally attach to those

> [...]
> And finally, systemtap.

(Thanks for trying it.)

> Reading some systemtap docs,
> where examples of intelligent filtering are shown:
> function inode_get_i_ino:long (i:long) %{ /* pure */
> struct inode *inode = (struct inode *)(long)THIS->i;
> THIS->__retvalue = kread(&(inode->i_ino));
> %}
> probe kernel.mark("kfunc_entry")
> {
> printf("inode number: %d\n", inode_get_i_ino($arg1))
> }
> Is this representative example?

I hope not -- this embedded-C stuff should only be necessary if we
need to compensate for the data-stingyness of the marker. See just
below that on the wiki page for a more generous marker.

> If yes, systemtap only wants marker's name and ignores totally its
> fmt string. So, why add them in the first place?

Actually, systemtap will have consumed the format strings by then
(during script translate time), in order to figure out the types of

> And if systemtap can hook at any place, it doesn't need markers (I
> haven't used it though, so correct me).

Systemtap doesn't *need* markers in the sense of it being an essential
prerequisite. But it is beneficial to have them around, in order to:

- suffer only a small fraction of kprobes dispatching overhead
- pass pretty arbitrary parameters without relying on much compiler
cooperation, and specifically without requiring debugging info

- FChE

 \ /
  Last update: 2008-05-04 22:45    [W:0.135 / U:6.440 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site