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
1e34f4e1
Commit
1e34f4e1
authored
Feb 09, 2017
by
Sasha Goldshtein
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trace: Migrate to new symbols API and remove addresses from stacks
parent
2f780685
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
tools/trace.py
tools/trace.py
+5
-3
No files found.
tools/trace.py
View file @
1e34f4e1
...
...
@@ -457,7 +457,8 @@ BPF_PERF_OUTPUT(%s);
stack
=
list
(
bpf
.
get_table
(
self
.
stacks_name
).
walk
(
stack_id
))
for
addr
in
stack
:
print
(
" %016x %s"
%
(
addr
,
bpf
.
sym
(
addr
,
tgid
)))
print
(
" %s"
%
(
bpf
.
sym
(
addr
,
tgid
,
show_module
=
True
,
show_address
=
True
)))
def
_format_message
(
self
,
bpf
,
tgid
,
values
):
# Replace each %K with kernel sym and %U with user sym in tgid
...
...
@@ -466,9 +467,10 @@ BPF_PERF_OUTPUT(%s);
user_placeholders
=
[
i
for
i
,
t
in
enumerate
(
self
.
types
)
if
t
==
'U'
]
for
kp
in
kernel_placeholders
:
values
[
kp
]
=
bpf
.
ksym
addr
(
values
[
kp
]
)
values
[
kp
]
=
bpf
.
ksym
(
values
[
kp
],
show_address
=
True
)
for
up
in
user_placeholders
:
values
[
up
]
=
bpf
.
symaddr
(
values
[
up
],
tgid
)
values
[
up
]
=
bpf
.
sym
(
values
[
up
],
tgid
,
show_module
=
True
,
show_address
=
True
)
return
self
.
python_format
%
tuple
(
values
)
def
print_event
(
self
,
bpf
,
cpu
,
data
,
size
):
...
...
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