public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "bugzilla at tecnocode dot co.uk" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug tapsets/20264] Load tapsets from $libdir for multiarch
Date: Thu, 16 Jun 2016 20:14:00 -0000	[thread overview]
Message-ID: <bug-20264-6586-IjSOz1S8tD@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-20264-6586@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=20264

--- Comment #2 from Philip Withnall <bugzilla at tecnocode dot co.uk> ---
(In reply to Frank Ch. Eigler from comment #1)
> Philip, systemtap has something similar already there: 
> 
> /usr/share/systemtap/tapset/$TARGET_ARCH/*.stp
> 
> is searched in addition to
> 
> /usr/share/systemtap/tapset/*.stp

I think the point is that the FHS defines /usr/share to be
"Architecture-independent (shared) data.". Having an architecture-specific
subdirectory inside it is a bit awkward.

A related problem is that if I have a custom (hacked up) copy of a library (for
example, which I'm testing in a process by loading with LD_PRELOAD from $HOME),
the .stp file for it will never be found. If the hacked up library contains new
probe points, they can't be used.

I think a nice solution would be if bug #20203 were fixed first, then systemtap
can be changed to look in the 'systemtap' subdirectory next to each library for
its .stp files. If bug #20203 is fixed, systemtap will already know which
directory each library has been resolved to be in; and hence it will not need
to hard-code a list of extra possible $libdirs to check.

For example, that means .stp files would normally be installed in
$libdir/systemtap/*.stp (where $libdir is the _library_'s $libdir, not
necessarily systemtap's $libdir). In the LD_PRELOAD case above, I could put my
hacked library in $HOME/libblah.so; and the hacked .stp script in
$HOME/systemtap/libblah.so.stp. In the case of Debian multiarch, .stp files
would be in /usr/lib/$multiarch_tuple/systemtap/*.stp.

Of course, systemtap should also still look in /usr/share/systemtap/tapset for
non-architecture-dependent .stp scripts.

> Plus an individual .stp file may contain %( arch == "x86-64" %? ... %)  type
> preprocessor conditionals.  Do these mechanisms suffice?

Given that this affects the process() call for each probe, that essentially
equates to wrapping the entire file in a preprocessor conditional.

-- 
You are receiving this mail because:
You are the assignee for the bug.

  parent reply	other threads:[~2016-06-16 20:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-16 17:16 [Bug tapsets/20264] New: " bugzilla at tecnocode dot co.uk
2016-06-16 17:35 ` [Bug tapsets/20264] " fche at redhat dot com
2016-06-16 20:14 ` bugzilla at tecnocode dot co.uk [this message]
2016-06-16 20:15 ` bugzilla at tecnocode dot co.uk
2016-06-16 20:23 ` fche at redhat dot com
2016-06-16 20:24 ` fche at redhat dot com
2016-06-16 20:49 ` bugzilla at tecnocode dot co.uk
2016-06-16 21:04 ` fche at redhat dot com
2019-05-21 17:43 ` fche at redhat dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-20264-6586-IjSOz1S8tD@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=systemtap@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).