This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: vfs tapset compilation error.


On Tue, 2011-01-25 at 12:38 +0100, Mark Wielaard wrote:
> On Mon, 2011-01-24 at 06:39 +0200, Daniel Fishman wrote:
> > When trying to execute the following:
> > 
> > stap -v -e 'probe vfs.read {printf("read performed\n"); exit()}'
> > 
> > compilation fails:
> > 
> > Pass 1: parsed user script and 144 library script(s) using 91224virt/39148res/2120shr kb, in 290usr/20sys/316real ms.
> > WARNING: cross-file global variable reference to identifier '__devnames' at /usr/share//systemtap/tapset/vfs.stp:20:8 from: identifier '__devnames' at /usr/share/systemtap/tapset/vfs.stp:23:13
> >  source: 	if (dev in __devnames)
> >          	           ^
> 
> I am not sure if this is related, or that the warning message is just
> confusing. We should probably fix that either way as soon as we figure
> out what is really going on. Note that it does refer to the same file,
> but one has a double slash in it:
>   at /usr/share//systemtap/tapset/vfs.stp:20:8
> from /usr/share/systemtap/tapset/vfs.stp:23:13

Just in case, could you try this hack to make sure the file names the
parse sees are always canonical?

commit 3bc15a1a0ac1de5b2196c45c307c32b976560d82
Author: Mark Wielaard <mjw@redhat.com>
Date:   Tue Jan 25 13:00:40 2011 +0100

    Make sure the file name the parser sees are canonical.

diff --git a/parse.cxx b/parse.cxx
index 2f6b2aa..b15f304 100644
--- a/parse.cxx
+++ b/parse.cxx
@@ -195,7 +195,8 @@ parser::parser (systemtap_session& s, istream& i, bool p):
 
 parser::parser (systemtap_session& s, const string& fn, bool p):
   session (s),
-  input_name (fn), free_input (new ifstream (input_name.c_str(), ios::in)),
+  input_name (canonicalize_file_name (fn.c_str())),
+  free_input (new ifstream (input_name.c_str(), ios::in)),
   input (* free_input, input_name, s), privileged (p),
   context(con_unknown), systemtap_v_seen(0), last_t (0), next_t (0), num_errors
 { }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]