From: Adrian Hunter <adrian.hunter@intel.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>, Andi Kleen <ak@linux.intel.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH V2 1/4] perf scripts python: exported-sql-viewer.py: Fall back to /usr/local/lib/libxed.so
Date: Sun, 4 Nov 2018 17:12:35 +0200 [thread overview]
Message-ID: <20181104151238.15947-2-adrian.hunter@intel.com> (raw)
In-Reply-To: <20181104151238.15947-1-adrian.hunter@intel.com>
Fall back to /usr/local/lib/libxed.so to cater for distributions that do
not have /usr/local/lib in the library path by default.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
---
tools/perf/scripts/python/exported-sql-viewer.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tools/perf/scripts/python/exported-sql-viewer.py b/tools/perf/scripts/python/exported-sql-viewer.py
index 24cb0bd56afa..20cc8e7879b9 100755
--- a/tools/perf/scripts/python/exported-sql-viewer.py
+++ b/tools/perf/scripts/python/exported-sql-viewer.py
@@ -1929,7 +1929,12 @@ class XEDInstruction():
class LibXED():
def __init__(self):
- self.libxed = CDLL("libxed.so")
+ try:
+ self.libxed = CDLL("libxed.so")
+ except:
+ self.libxed = None
+ if not self.libxed:
+ self.libxed = CDLL("/usr/local/lib/libxed.so")
self.xed_tables_init = self.libxed.xed_tables_init
self.xed_tables_init.restype = None
--
2.17.1
next prev parent reply other threads:[~2018-11-04 15:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-04 15:12 [PATCH V2 0/4] perf scripts python: exported-sql-viewer.py Adrian Hunter
2018-11-04 15:12 ` Adrian Hunter [this message]
2018-11-06 19:15 ` [tip:perf/urgent] perf scripts python: exported-sql-viewer.py: Fall back to /usr/local/lib/libxed.so tip-bot for Adrian Hunter
2018-11-04 15:12 ` [PATCH V2 2/4] perf scripts python: exported-sql-viewer.py: Add Selected branches report Adrian Hunter
2018-11-06 19:15 ` [tip:perf/urgent] " tip-bot for Adrian Hunter
2018-11-04 15:12 ` [PATCH V2 3/4] perf scripts python: exported-sql-viewer.py: Add help window Adrian Hunter
2018-11-06 19:16 ` [tip:perf/urgent] " tip-bot for Adrian Hunter
2018-11-04 15:12 ` [PATCH V2 4/4] perf scripts python: exported-sql-viewer.py: Fix table find when table re-ordered Adrian Hunter
2018-11-06 19:16 ` [tip:perf/urgent] " tip-bot for Adrian Hunter
2018-11-05 17:53 ` [PATCH V2 0/4] perf scripts python: exported-sql-viewer.py Arnaldo Carvalho de Melo
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=20181104151238.15947-2-adrian.hunter@intel.com \
--to=adrian.hunter@intel.com \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.