Bug 9932 - @cast module search path
Summary: @cast module search path
Status: RESOLVED FIXED
Alias: None
Product: systemtap
Classification: Unclassified
Component: translator (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Josh Stone
URL:
Keywords:
Depends on:
Blocks: 9871
  Show dependency treegraph
 
Reported: 2009-03-07 22:07 UTC by Frank Ch. Eigler
Modified: 2009-03-10 23:26 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
Temporary fix/workaround patch for sunrpc as module (476 bytes, patch)
2009-03-09 21:05 UTC, Mark Wielaard
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Ch. Eigler 2009-03-07 22:07:36 UTC
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")
Comment 1 Mark Wielaard 2009-03-09 21:03:55 UTC
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.
Comment 2 Mark Wielaard 2009-03-09 21:05:18 UTC
Created attachment 3805 [details]
Temporary fix/workaround patch for sunrpc as module
Comment 3 Josh Stone 2009-03-10 17:52:58 UTC
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.
Comment 4 Josh Stone 2009-03-10 23:26:19 UTC
merged in commit f400d6e427cb7494d072ad124e7996925015bdf4