diff options
author | William Cohen <wcohen@redhat.com> | 2009-09-08 14:17:45 -0400 |
---|---|---|
committer | William Cohen <wcohen@redhat.com> | 2009-09-08 14:17:45 -0400 |
commit | 7dc5b46bc1ddbe3fbe6d89472f42231756a54185 (patch) | |
tree | 8ff2c658c1b649be449eaa51d67424430a519412 /testsuite/systemtap.examples/io/iostat-scsi.stp | |
parent | 8b82510024a90c29114cf434e14bde84beb9b7da (diff) | |
download | systemtap-steved-7dc5b46bc1ddbe3fbe6d89472f42231756a54185.tar.gz systemtap-steved-7dc5b46bc1ddbe3fbe6d89472f42231756a54185.tar.xz systemtap-steved-7dc5b46bc1ddbe3fbe6d89472f42231756a54185.zip |
Clean up iostat-scsi.stp and add to the regular testing.
Diffstat (limited to 'testsuite/systemtap.examples/io/iostat-scsi.stp')
-rwxr-xr-x | testsuite/systemtap.examples/io/iostat-scsi.stp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/testsuite/systemtap.examples/io/iostat-scsi.stp b/testsuite/systemtap.examples/io/iostat-scsi.stp index 15833af8..8251741d 100755 --- a/testsuite/systemtap.examples/io/iostat-scsi.stp +++ b/testsuite/systemtap.examples/io/iostat-scsi.stp @@ -19,15 +19,10 @@ probe module("sd_mod").function("sd_init_command") !, kernel.function("sd_init_c reads[device] <<< nr_sectors * sector_size } %: -%{ -#include <scsi/scsi_device.h> -%} -function get_sector_size:long (data:long) %{ /* pure */ - struct scsi_device *sdp = (struct scsi_device *)((long)THIS->data); - THIS->__retvalue = kread(&(sdp->sector_size)); - CATCH_DEREF_FAULT(); -%} +function get_sector_size:long (data:long) { /* pure */ + return @cast(data, "scsi_device", "kernel<scsi/scsi_device.h>")->sector_size +} probe module("sd_mod").function("sd_prep_fn") !, kernel.function("sd_prep_fn") { device=kernel_string($rq->rq_disk->disk_name) |