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
eba1483f
Commit
eba1483f
authored
Jun 25, 2018
by
Jürgen Hötzel
Committed by
yonghong-song
Jun 25, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Decode C strings into Python strings (#1847)
Leftover from #986.
parent
203dbbd2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
tools/profile.py
tools/profile.py
+3
-3
No files found.
tools/profile.py
View file @
eba1483f
...
...
@@ -304,7 +304,7 @@ for k, v in sorted(counts.items(), key=lambda counts: counts[1].value):
# print folded stack output
user_stack
=
list
(
user_stack
)
kernel_stack
=
list
(
kernel_stack
)
line
=
[
k
.
name
.
decode
()
]
line
=
[
k
.
name
]
# if we failed to get the stack is, such as due to no space (-ENOMEM) or
# hash collision (-EEXIST), we still print a placeholder for consistency
if
not
args
.
kernel_stacks_only
:
...
...
@@ -318,7 +318,7 @@ for k, v in sorted(counts.items(), key=lambda counts: counts[1].value):
line
.
append
(
"[Missed Kernel Stack]"
)
else
:
line
.
extend
([
b
.
ksym
(
addr
)
for
addr
in
reversed
(
kernel_stack
)])
print
(
"%s %d"
%
(
";"
.
join
(
line
),
v
.
value
))
print
(
"%s %d"
%
(
b";"
.
join
(
line
).
decode
(
),
v
.
value
))
else
:
# print default multi-line stack output
if
not
args
.
user_stacks_only
:
...
...
@@ -334,7 +334,7 @@ for k, v in sorted(counts.items(), key=lambda counts: counts[1].value):
print
(
" [Missed User Stack]"
)
else
:
for
addr
in
user_stack
:
print
(
" %s"
%
b
.
sym
(
addr
,
k
.
pid
))
print
(
" %s"
%
b
.
sym
(
addr
,
k
.
pid
)
.
decode
()
)
print
(
" %-16s %s (%d)"
%
(
"-"
,
k
.
name
.
decode
(),
k
.
pid
))
print
(
" %d
\
n
"
%
v
.
value
)
...
...
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