diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2018-11-04 10:12:35 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-11-05 12:51:31 -0500 |
commit | 5ed4419d47f8ba6bbccd8e3203276b3c39a792b7 (patch) | |
tree | dab5da8de05648cf80321740216d5f9acfa7ad5f /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 590ac60d8aa929bd21e35cd95a7d8720d00eb4f3 (diff) |
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>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
-rwxr-xr-x | tools/perf/scripts/python/exported-sql-viewer.py | 7 |
1 files changed, 6 insertions, 1 deletions
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(): | |||
1929 | class LibXED(): | 1929 | class LibXED(): |
1930 | 1930 | ||
1931 | def __init__(self): | 1931 | def __init__(self): |
1932 | self.libxed = CDLL("libxed.so") | 1932 | try: |
1933 | self.libxed = CDLL("libxed.so") | ||
1934 | except: | ||
1935 | self.libxed = None | ||
1936 | if not self.libxed: | ||
1937 | self.libxed = CDLL("/usr/local/lib/libxed.so") | ||
1933 | 1938 | ||
1934 | self.xed_tables_init = self.libxed.xed_tables_init | 1939 | self.xed_tables_init = self.libxed.xed_tables_init |
1935 | self.xed_tables_init.restype = None | 1940 | self.xed_tables_init.restype = None |