mirror of
https://github.com/plasma-umass/coz.git
synced 2024-09-11 04:55:25 +03:00
Merge pull request #52 from petterreinholdtsen/load-from-pkglib
Look for libcoz.so in the /usr/lib/coz-profiler/ location first.
This commit is contained in:
commit
669106b3ea
7
coz
7
coz
@ -39,8 +39,11 @@ def _coz_run(args):
|
||||
sys.exit(1)
|
||||
|
||||
env = copy.deepcopy(os.environ)
|
||||
coz_prefix = dirname(realpath(sys.argv[0]))
|
||||
coz_runtime = coz_prefix + path_sep + 'libcoz' + path_sep + 'libcoz.so'
|
||||
if os.path.exists('/usr/lib/coz-profiler/libcoz.so'):
|
||||
coz_runtime = '/usr/lib/coz-profiler/libcoz.so'
|
||||
else:
|
||||
coz_prefix = dirname(realpath(sys.argv[0]))
|
||||
coz_runtime = coz_prefix + path_sep + 'libcoz' + path_sep + 'libcoz.so'
|
||||
|
||||
if 'LD_PRELOAD' in env:
|
||||
env['LD_PRELOAD'] += ':' + coz_runtime
|
||||
|
Loading…
Reference in New Issue
Block a user