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: PR4186: cross-compilation, $ARCH


On 08/25/2009 09:50 AM, Frank Ch. Eigler wrote:
> Hi -
> 
>> [...]
>> - Are we planning on extending '%arch' (or perhaps adding '%user_arch')
>> to tell the difference between 32-bit and 64-bit user exes?
> 
> This would makes sense only as a per-probe-point construct, since the
> same stap script on a 64-bit host can instrument 32- and 64-bit
> userspace programs just fine.
> 
> 
>> - I'd probably go with solution #2 [switching to kernel "arch"], but
>> also provide "aliases" for the old names (assuming that's possible).
> 
> I don't know.  We'd have to handle things like
>   %( arch == "i686" %? /*A*/ %: /*B*/ %) 
> and also
>   %( arch == "i686" %? /*A*/ %: %( arch == "i386" %? /*B*/ %: /*C*/ %) %)
> 
> - FChE

I'm not sure I explained myself well about the aliases (or I didn't read
your response correctly).  What I'm suggesting is that the following
*both* match:

%(arch == "i686" %? /*A*/ %)

%(arch == "i386" %? /*A*/ %)

i.e., in the translator, let arch matching be done with a wildcard.  In
the case of x86, it would be like checking the user's string against the
regular expression 'i[3-6]86'.

I just poked through the tapsets, and it seems that when i386/i686 are
looked at, both cases appear to be handled the same anyway, so it
wouldn't really matter if both matched.

-- 
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)


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