Related to bug #2067, with @cast() now taking a module name argument, we can fail to process a @cast() if the type named was only defined in a module rather than core vmlinux. e.g. rhel5 scsi_device, as in the newly failing buildok/scsi* tests. So perhaps @cast could grow a search-path facility: @cast(value, "scsi_device", "kernel:scsi_mod")
Same is necessary for the new rpc code after: commit fb3b52a7346202fea1905ed680a3256d372a7b03 Author: Wenji Huang <wenji.huang@oracle.com> Date: Fri Mar 6 00:16:50 2009 -0500 PR9871: use @cast in tapset Rewrite some functions using type casting to get rid of embedded C code in nfs, scsi, signal, socket, rpc, task and vfs tapset. Signed-off-by: Wenji Huang <wenji.huang@oracle.com> This results in failing tests like: starting /home/mark/src/systemtap/testsuite/buildok/rpc-embedded.stp spawn1 stap -p4 /home/mark/src/systemtap/testsuite/buildok/rpc-embedded.stp semantic error: type definition not found: identifier '@cast' at /usr/local/systemtap/share/systemtap/tapset/rpc.stp:974:14^M semantic error: type definition not found: identifier '@cast' at /usr/local/systemtap/share/systemtap/tapset/rpc.stp:974:14^M source: rpc_proc = @cast(msg, "rpc_message", "kernel")->rpc_proc^M Because on my system sunrpc is compiled as a module.
Created attachment 3805 [details] Temporary fix/workaround patch for sunrpc as module
In the future we may want to expand this to all module-searching components, but for now I'll work on adding it for @cast.
merged in commit f400d6e427cb7494d072ad124e7996925015bdf4