Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bcc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
bcc
Commits
435839a9
Commit
435839a9
authored
Mar 30, 2016
by
Sasha Goldshtein
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replaced `which --skip-alias` with `ProcUtils.which`
parent
7cf96a44
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
tools/trace.py
tools/trace.py
+2
-5
No files found.
tools/trace.py
View file @
435839a9
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
# Licensed under the Apache License, Version 2.0 (the "License")
# Licensed under the Apache License, Version 2.0 (the "License")
# Copyright (C) 2016 Sasha Goldshtein.
# Copyright (C) 2016 Sasha Goldshtein.
from
bcc
import
BPF
,
Tracepoint
,
Perf
,
USDTReader
from
bcc
import
BPF
,
Tracepoint
,
Perf
,
ProcUtils
,
USDTReader
from
time
import
sleep
,
strftime
from
time
import
sleep
,
strftime
import
argparse
import
argparse
import
re
import
re
...
@@ -416,10 +416,7 @@ BPF_PERF_OUTPUT(%s);
...
@@ -416,10 +416,7 @@ BPF_PERF_OUTPUT(%s);
libpath
=
BPF
.
find_library
(
self
.
library
)
libpath
=
BPF
.
find_library
(
self
.
library
)
if
libpath
is
None
:
if
libpath
is
None
:
# This might be an executable (e.g. 'bash')
# This might be an executable (e.g. 'bash')
with
os
.
popen
(
libpath
=
ProcUtils
.
which
(
self
.
library
)
"/usr/bin/which --skip-alias %s 2>/dev/null"
%
self
.
library
)
as
w
:
libpath
=
w
.
read
().
strip
()
if
libpath
is
None
or
len
(
libpath
)
==
0
:
if
libpath
is
None
or
len
(
libpath
)
==
0
:
self
.
_bail
(
"unable to find library %s"
%
self
.
library
)
self
.
_bail
(
"unable to find library %s"
%
self
.
library
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment