Inserting delays with systemtap
Bryn M. Reeves
bmr@redhat.com
Thu Mar 8 17:17:00 GMT 2012
On 03/07/2012 03:41 PM, Frank Ch. Eigler wrote:
> Nah, that's only because #! shebang lines are defined to pass a
> solitary argument to the interpreter. Note the "-g" in the quoted
> string.
Gotcha - thanks. It does indeed work fine if I remove the -g and specify
it on the command line.
I've attached a patch that adds the guru_delay.stp patchset - I also
included a wrapper around udelay() in case anyone has a use for that
(it's too fine a granularity for my application but I can see other
instances where it could be useful).
Tested locally with a simplified version of the original script and
appears to work. Using -g is required as expected:
#!/usr/bin/stap
probe module("cdc_acm").statement("*@drivers/usb/class/cdc-acm.c:341") {
mdelay($1)
}
Cheers,
Bryn.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-guru_delay.stp-to-tapset.patch
Type: text/x-patch
Size: 1241 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/systemtap/attachments/20120308/07362366/attachment.bin>
More information about the Systemtap
mailing list