Skip to content

Commit

Permalink
docs: add hint howto get perf to show bpf JIT symbols
Browse files Browse the repository at this point in the history
This section should be cleaned up, but just record this info here for now.

Thanks to Daniel Borkmann for teaching me this trick.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
  • Loading branch information
netoptimizer committed Apr 20, 2017
1 parent 7a8cb38 commit e4745de
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions kernel/Documentation/bpf/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,19 @@ The ``proglen`` is the len of opcode sequence generated and ``flen``
is the number of bpf insns. You can use tools/net/bpf_jit_disasm.c to
disassemble that output. bpf_jit_disasm -o will dump the related
opcodes as well.

Perf tool symbols
=================

For JITed progs, you can do sysctl net/core/bpf_jit_kallsyms=1
and f.e. perf script --kallsyms=/proc/kallsyms to show them based
on the tag::

sysctl net/core/bpf_jit_kallsyms=1

Detail see commit: https://git.kernel.org/torvalds/c/74451e66d516c55e3

Remember to use the perf command-line option --kallsyms=/proc/kallsyms
to get the symobols resolved, like::

# perf report --no-children --kallsyms=/proc/kallsyms

0 comments on commit e4745de

Please sign in to comment.