All of lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Adrian Hunter <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: mingo@kernel.org, adrian.hunter@intel.com, hpa@zytor.com,
	tglx@linutronix.de, linux-kernel@vger.kernel.org,
	ak@linux.intel.com, acme@redhat.com, jolsa@redhat.com
Subject: [tip:perf/urgent] perf scripts python: exported-sql-viewer.py: Fall back to /usr/local/lib/libxed.so
Date: Tue, 6 Nov 2018 11:15:11 -0800	[thread overview]
Message-ID: <tip-5ed4419d47f8ba6bbccd8e3203276b3c39a792b7@git.kernel.org> (raw)
In-Reply-To: <20181104151238.15947-2-adrian.hunter@intel.com>

Commit-ID:  5ed4419d47f8ba6bbccd8e3203276b3c39a792b7
Gitweb:     https://git.kernel.org/tip/5ed4419d47f8ba6bbccd8e3203276b3c39a792b7
Author:     Adrian Hunter <adrian.hunter@intel.com>
AuthorDate: Sun, 4 Nov 2018 17:12:35 +0200
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 5 Nov 2018 14:51:31 -0300

perf scripts python: exported-sql-viewer.py: Fall back to /usr/local/lib/libxed.so

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>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/20181104151238.15947-2-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.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

  reply	other threads:[~2018-11-06 19:15 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 ` [PATCH V2 1/4] perf scripts python: exported-sql-viewer.py: Fall back to /usr/local/lib/libxed.so Adrian Hunter
2018-11-06 19:15   ` tip-bot for Adrian Hunter [this message]
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=tip-5ed4419d47f8ba6bbccd8e3203276b3c39a792b7@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=ak@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    /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.