]> sourceware.org Git - systemtap.git/commit
traceio.stp example: check for negative $return
authorJonathan Lebon <jlebon@redhat.com>
Fri, 24 May 2013 14:33:06 +0000 (10:33 -0400)
committerJonathan Lebon <jlebon@redhat.com>
Fri, 24 May 2013 21:21:56 +0000 (17:21 -0400)
commit76297499ddb5d1cb1b372e7bf86b4fcf2bd6f06e
tree7885f61e3a7fd76223721d5a2fd5e69a483cda44
parentc29c6f8391d35e67818da317b000296c5e6cb830
traceio.stp example: check for negative $return

The I/O reads and writes should only be counted when $return is
nonnegative. A negative $result occurs if an error was met (e.g.
EAGAIN = -11).

We could have instead here used the bytes_read/written variables
provided by the tapset, but this example demonstrates the use of
local vars and is also consistent with the disktop.stp example.
doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-traceio.xml
testsuite/systemtap.examples/io/traceio.stp
This page took 0.026479 seconds and 5 git commands to generate.