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
1929class LibXED():1929class 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_init1939 self.xed_tables_init = self.libxed.xed_tables_init
1935 self.xed_tables_init.restype = None1940 self.xed_tables_init.restype = None