Skip to content

Commit

Permalink
adding filtering example to trace.py help
Browse files Browse the repository at this point in the history
  • Loading branch information
tehnerd committed Jan 24, 2018
1 parent 89aa294 commit 86293f0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,10 @@ class Tool(object):
in kernel/sched/sched.h which is in kernel source tree and not in kernel-devel
package. So this command needs to run at the kernel source tree root directory
so that the added header file can be found by the compiler.
trace -I 'net/sock.h' \\
'udpv6_sendmsg(struct sock *sk) (sk->sk_dport == 13568)'
Trace udpv6 sendmsg calls only if socket's destination port is equal
to 53 (DNS; 13568 in big endian order)
"""

def __init__(self):
Expand Down
5 changes: 5 additions & 0 deletions tools/trace_example.txt
Original file line number Diff line number Diff line change
Expand Up @@ -292,3 +292,8 @@ trace -I 'kernel/sched/sched.h' \
in kernel/sched/sched.h which is in kernel source tree and not in kernel-devel
package. So this command needs to run at the kernel source tree root directory
so that the added header file can be found by the compiler.
trace -I 'net/sock.h' \\
'udpv6_sendmsg(struct sock *sk) (sk->sk_dport == 13568)'
Trace udpv6 sendmsg calls only if socket's destination port is equal
to 53 (DNS; 13568 in big endian order)
"

0 comments on commit 86293f0

Please sign in to comment.