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
5467ccf4
Commit
5467ccf4
authored
Feb 10, 2017
by
Brenden Blanco
Committed by
GitHub
Feb 10, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #959 from r4f4/fix-uobjnew
Fix uobjnew and ustat on python3
parents
77d5273e
573a5d4e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
src/python/bcc/usdt.py
src/python/bcc/usdt.py
+1
-1
tools/uobjnew.py
tools/uobjnew.py
+3
-3
tools/ustat.py
tools/ustat.py
+2
-2
No files found.
src/python/bcc/usdt.py
View file @
5467ccf4
...
...
@@ -128,7 +128,7 @@ class USDT(object):
probe
)
def
get_text
(
self
):
return
lib
.
bcc_usdt_genargs
(
self
.
context
)
return
lib
.
bcc_usdt_genargs
(
self
.
context
)
.
decode
()
def
get_probe_arg_ctype
(
self
,
probe_name
,
arg_index
):
return
lib
.
bcc_usdt_get_probe_argctype
(
...
...
tools/uobjnew.py
View file @
5467ccf4
...
...
@@ -147,13 +147,13 @@ while True:
print
()
data
=
bpf
[
"allocs"
]
if
args
.
top_count
:
data
=
sorted
(
data
.
items
(),
key
=
lambda
(
k
,
v
)
:
v
.
num_allocs
)
data
=
sorted
(
data
.
items
(),
key
=
lambda
k
,
v
:
v
.
num_allocs
)
data
=
data
[
-
args
.
top_count
:]
elif
args
.
top_size
:
data
=
sorted
(
data
.
items
(),
key
=
lambda
(
k
,
v
)
:
v
.
total_size
)
data
=
sorted
(
data
.
items
(),
key
=
lambda
k
,
v
:
v
.
total_size
)
data
=
data
[
-
args
.
top_size
:]
else
:
data
=
sorted
(
data
.
items
(),
key
=
lambda
(
k
,
v
)
:
v
.
total_size
)
data
=
sorted
(
data
.
items
(),
key
=
lambda
k
,
v
:
v
.
total_size
)
print
(
"%-30s %8s %12s"
%
(
"TYPE"
,
"# ALLOCS"
,
"# BYTES"
))
for
key
,
value
in
data
:
if
args
.
language
==
"c"
:
...
...
tools/ustat.py
View file @
5467ccf4
...
...
@@ -239,10 +239,10 @@ class Tool(object):
counts
.
update
(
probe
.
get_counts
(
self
.
bpf
))
targets
.
update
(
probe
.
targets
)
if
self
.
args
.
sort
:
counts
=
sorted
(
counts
.
items
(),
key
=
lambda
(
_
,
v
)
:
counts
=
sorted
(
counts
.
items
(),
key
=
lambda
_
,
v
:
-
v
.
get
(
self
.
args
.
sort
.
upper
(),
0
))
else
:
counts
=
sorted
(
counts
.
items
(),
key
=
lambda
(
k
,
_
)
:
k
)
counts
=
sorted
(
counts
.
items
(),
key
=
lambda
k
,
_
:
k
)
for
pid
,
stats
in
counts
:
print
(
"%-6d %-20s %-10d %-6d %-10d %-8d %-6d %-6d"
%
(
pid
,
targets
[
pid
][:
20
],
...
...
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