diff options
| author | Adrian Hunter <[email protected]> | 2018-11-04 15:12:35 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2018-11-05 17:51:31 +0000 |
| commit | 5ed4419d47f8ba6bbccd8e3203276b3c39a792b7 (patch) | |
| tree | dab5da8de05648cf80321740216d5f9acfa7ad5f /tools/perf/scripts/python/exported-sql-viewer.py | |
| parent | perf top: Display the LBR stats in callchain entry (diff) | |
| download | kernel-5ed4419d47f8ba6bbccd8e3203276b3c39a792b7.tar.gz kernel-5ed4419d47f8ba6bbccd8e3203276b3c39a792b7.zip | |
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 <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Jiri Olsa <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
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(): 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 |
