History

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.

Adrian Hunter committed 8 years ago

Commit 5ed44191 parent 590ac601 file · +6 −1Browse files

Showing the changes to tools/perf/scripts/python (1 of 1 file). Show all

Unified · Split

tools/perf/scripts/python/exported-sql-viewer.py+6−1
@@ -1929,7 +1929,12 @@ class XEDInstruction(): · 1928 unmodified lines
19291929 class LibXED():
19301930
19311931 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")
19331938
19341939 self.xed_tables_init = self.libxed.xed_tables_init
19351940 self.xed_tables_init.restype = None