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
aee5ecf0
Commit
aee5ecf0
authored
Feb 08, 2017
by
Rafael Fonseca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trace: fix for python3
xrange does not exist in py3.
parent
3e77af57
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
tools/trace.py
tools/trace.py
+4
-4
No files found.
tools/trace.py
View file @
aee5ecf0
...
@@ -483,10 +483,10 @@ BPF_PERF_OUTPUT(%s);
...
@@ -483,10 +483,10 @@ BPF_PERF_OUTPUT(%s);
def
_format_message
(
self
,
bpf
,
tgid
,
values
):
def
_format_message
(
self
,
bpf
,
tgid
,
values
):
# Replace each %K with kernel sym and %U with user sym in tgid
# Replace each %K with kernel sym and %U with user sym in tgid
kernel_placeholders
=
[
i
for
i
in
xrange
(
0
,
len
(
self
.
types
)
)
kernel_placeholders
=
[
i
for
i
,
t
in
enumerate
(
self
.
types
)
if
self
.
types
[
i
]
==
'K'
]
if
t
==
'K'
]
user_placeholders
=
[
i
for
i
in
xrange
(
0
,
len
(
self
.
types
)
)
user_placeholders
=
[
i
for
i
,
t
in
enumerate
(
self
.
types
)
if
self
.
types
[
i
]
==
'U'
]
if
t
==
'U'
]
for
kp
in
kernel_placeholders
:
for
kp
in
kernel_placeholders
:
values
[
kp
]
=
bpf
.
ksymaddr
(
values
[
kp
])
values
[
kp
]
=
bpf
.
ksymaddr
(
values
[
kp
])
for
up
in
user_placeholders
:
for
up
in
user_placeholders
:
...
...
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