]> sourceware.org Git - systemtap.git/commitdiff
Use explicit @cast() operators to fslatency-nd.stp and fsslower-nd.stp
authorWilliam Cohen <wcohen@redhat.com>
Wed, 17 Jun 2020 17:08:30 +0000 (13:08 -0400)
committerWilliam Cohen <wcohen@redhat.com>
Wed, 17 Jun 2020 17:08:30 +0000 (13:08 -0400)
Commit 00ee19ff030f665df7e087a579f39105256a0253 changed how @cast()
operations work and they no longer default to using the kernel
debuginfo for type information.  Need to include kernel as location for
this information for the  @cast() rather than just assuming a default.

testsuite/systemtap.examples/lwtools/fslatency-nd.stp
testsuite/systemtap.examples/lwtools/fsslower-nd.stp

index 60083994b35c78a149371b8c4b04c05be4eba387..0bee34f2faa975048fd0b68019814770292daa03 100755 (executable)
@@ -63,8 +63,8 @@ probe __vfs_read = kprobe.function("__vfs_read")
 {
        # Skip the call if new_sync_read() wouldn't be called.
        file = pointer_arg(1)
-       if (!file || @cast(file, "file")->f_op->read
-           || !@cast(file, "file")->f_op->read_iter)
+       if (!file || @cast(file, "file", "kernel")->f_op->read
+           || !@cast(file, "file", "kernel")->f_op->read_iter)
                next
 }
 
@@ -75,8 +75,8 @@ probe __vfs_write = kprobe.function("__vfs_write")
 {
        # Skip the call if new_sync_write() wouldn't be called.
        file = pointer_arg(1)
-       if (!file || @cast(file, "file")->f_op->write
-           || !@cast(file, "file")->f_op->write_iter)
+       if (!file || @cast(file, "file", "kernel")->f_op->write
+           || !@cast(file, "file", "kernel")->f_op->write_iter)
                next
 }
 
@@ -102,8 +102,8 @@ probe __vfs_read.return = kprobe.function("__vfs_read").return
 {
        # Skip the call if new_sync_read() wouldn't be called.
        file = @entry(pointer_arg(1))
-       if (!file || @cast(file, "file")->f_op->read
-           || !@cast(file, "file")->f_op->read_iter)
+       if (!file || @cast(file, "file", "kernel")->f_op->read
+           || !@cast(file, "file", "kernel")->f_op->read_iter)
                next
 }
 
@@ -115,8 +115,8 @@ probe __vfs_write.return = kprobe.function("__vfs_write")
 {
        # Skip the call if new_sync_write() wouldn't be called.
        file = pointer_arg(1)
-       if (!file || @cast(file, "file")->f_op->write
-           || !@cast(file, "file")->f_op->write_iter)
+       if (!file || @cast(file, "file", "kernel")->f_op->write
+           || !@cast(file, "file", "kernel")->f_op->write_iter)
                next
 }
 
index 64abe41958a82253800376eb472b9bcdba615c78..90fa9b54debdf4bdb2c50d63000b972f214b6b73 100755 (executable)
@@ -65,8 +65,8 @@ probe __vfs_read = kprobe.function("__vfs_read")
 {
        # Skip the call if new_sync_read() wouldn't be called.
        file = pointer_arg(1)
-       if (!file || @cast(file, "file")->f_op->read
-           || !@cast(file, "file")->f_op->read_iter)
+       if (!file || @cast(file, "file", "kernel")->f_op->read
+           || !@cast(file, "file", "kernel")->f_op->read_iter)
                next
 }
 
@@ -77,8 +77,8 @@ probe __vfs_write = kprobe.function("__vfs_write")
 {
        # Skip the call if new_sync_write() wouldn't be called.
        file = pointer_arg(1)
-       if (!file || @cast(file, "file")->f_op->write
-           || !@cast(file, "file")->f_op->write_iter)
+       if (!file || @cast(file, "file", "kernel")->f_op->write
+           || !@cast(file, "file", "kernel")->f_op->write_iter)
                next
 }
 
@@ -110,8 +110,8 @@ probe __vfs_read.return = kprobe.function("__vfs_read").return
 {
        # Skip the call if new_sync_read() wouldn't be called.
        file = @entry(pointer_arg(1))
-       if (!file || @cast(file, "file")->f_op->read
-           || !@cast(file, "file")->f_op->read_iter)
+       if (!file || @cast(file, "file", "kernel")->f_op->read
+           || !@cast(file, "file", "kernel")->f_op->read_iter)
                next
 }
 
@@ -123,7 +123,7 @@ probe __vfs_write.return = kprobe.function("__vfs_write")
 {
        # Skip the call if new_sync_write() wouldn't be called.
        file = pointer_arg(1)
-       if (!file || @cast(file, "file")->f_op->write
-           || !@cast(file, "file")->f_op->write_iter)
+       if (!file || @cast(file, "file", "kernel")->f_op->write
+           || !@cast(file, "file", "kernel")->f_op->write_iter)
                next
 }
This page took 0.034336 seconds and 5 git commands to generate.