diff options
author | Dave Brolley <brolley@redhat.com> | 2009-12-21 12:42:11 -0500 |
---|---|---|
committer | Dave Brolley <brolley@redhat.com> | 2009-12-21 12:42:11 -0500 |
commit | 25a0404570724499bcdf1ebfd9f03084c2e00137 (patch) | |
tree | f9824f847b407790ab10116c2ebcc7e664d53253 /testsuite/systemtap.examples/general/grapher.stp | |
parent | 08098abb6b206dc3aea984f18b5054d34e015185 (diff) | |
parent | c6fcc4c1ca5f222cf90bf3968e34a10f09b30be4 (diff) | |
download | systemtap-steved-25a0404570724499bcdf1ebfd9f03084c2e00137.tar.gz systemtap-steved-25a0404570724499bcdf1ebfd9f03084c2e00137.tar.xz systemtap-steved-25a0404570724499bcdf1ebfd9f03084c2e00137.zip |
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
Diffstat (limited to 'testsuite/systemtap.examples/general/grapher.stp')
-rwxr-xr-x | testsuite/systemtap.examples/general/grapher.stp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/testsuite/systemtap.examples/general/grapher.stp b/testsuite/systemtap.examples/general/grapher.stp index baeeff5c..46f5063c 100755 --- a/testsuite/systemtap.examples/general/grapher.stp +++ b/testsuite/systemtap.examples/general/grapher.stp @@ -35,17 +35,18 @@ probe kernel.function("kbd_event") { } probe kernel.function("pty_write") { - if ($count > 0) { - printf("pty %d ", gettimeofday_ms()) - str = kernel_string($buf) - for (i = 0; i < $count; ++i) { - if (i > 1) - printf("\n") - # yes it's gross - c = substr(str, i, 1) - printf("%s", text_str(c)) - } - printf("%c", 0) + count = %(kernel_v>="2.6.31" %? $c %: $count %) + if (count > 0) { + printf("pty %d ", gettimeofday_ms()) + str = kernel_string($buf) + for (i = 0; i < count; ++i) { + if (i > 1) + printf("\n") + # yes it's gross + c = substr(str, i, 1) + printf("%s", text_str(c)) + } + printf("%c", 0) } } |