Command line arg for kernel Tracepoints

Mark Wielaard mjw@redhat.com
Mon Jan 3 12:44:00 GMT 2011


On Mon, 2011-01-03 at 17:39 +0530, h patel wrote:
> It didn't work. Script can take the argument but kernel.trace can not.
> Looks like kernel.trace only handles pattern, not argument.
> In that case, I will limit down the types of events.
>
> Error :
> parse error: expected literal string or number
>        saw: identifier 'tpoint' at test.stp:9:20
>     source: probe kernel.trace(tpoint) { printf("%s
> called\n",kernel_string($log)) }

Note that kernel.trace() takes a string.
So it would be kernel.trace("tpoint") in your case.
To use wildcards, embed * inside the string.
For example to get a list of all kernel trace points:
stap -l 'kernel.trace("*")'

Cheers,

Mark



More information about the Systemtap mailing list