kernel-fxtec-pro1x/tools/perf/Documentation
Arnaldo Carvalho de Melo 1c6a800cde perf test: Initial regression testing command
First an example with the first internal test:

[acme@doppio linux-2.6-tip]$ perf test
 1: vmlinux symtab matches kallsyms: Ok

So it run just one test, that is "vmlinux symtab matches kallsyms", and it was
successful.

If we run it in verbose mode, we'll see details about errors and extra warnings
for non-fatal problems:

[acme@doppio linux-2.6-tip]$ perf test -v
 1: vmlinux symtab matches kallsyms:
--- start ---
Looking at the vmlinux_path (5 entries long)
No build_id in vmlinux, ignoring it
No build_id in /boot/vmlinux, ignoring it
No build_id in /boot/vmlinux-2.6.34-rc4-tip+, ignoring it
Using /lib/modules/2.6.34-rc4-tip+/build/vmlinux for symbols
Maps only in vmlinux:
 ffffffff81cb81b1-ffffffff81e1149b 0 [kernel].init.text
 ffffffff81e1149c-ffffffff9fffffff 0 [kernel].exit.text
 ffffffffff600000-ffffffffff6000ff 0 [kernel].vsyscall_0
 ffffffffff600100-ffffffffff6003ff 0 [kernel].vsyscall_fn
 ffffffffff600400-ffffffffff6007ff 0 [kernel].vsyscall_1
 ffffffffff600800-ffffffffffffffff 0 [kernel].vsyscall_2
Maps in vmlinux with a different name in kallsyms:
 ffffffffff600000-ffffffffff6000ff 0 [kernel].vsyscall_0 in kallsyms as [kernel].0
 ffffffffff600100-ffffffffff6003ff 0 [kernel].vsyscall_fn in kallsyms as:
*ffffffffff600100-ffffffffff60012f 0 [kernel].2
 ffffffffff600400-ffffffffff6007ff 0 [kernel].vsyscall_1 in kallsyms as [kernel].6
 ffffffffff600800-ffffffffffffffff 0 [kernel].vsyscall_2 in kallsyms as [kernel].8
Maps only in kallsyms:
 ffffffffff600130-ffffffffff6003ff 0 [kernel].4
---- end ----
vmlinux symtab matches kallsyms: Ok
[acme@doppio linux-2.6-tip]$

In the above case we only know the name of the non contiguous kernel ranges in
the address space when reading the symbol information from the ELF symtab in
vmlinux.

The /proc/kallsyms file lack this, we only notice they are separate because
there are modules after the kernel and after that more kernel functions, so we
need to have a module rbtree backed by the module .ko path to get symtabs in
the vmlinux case.

The tool uses it to match by address to emit appropriate warning, but don't
considers this fatal.

The .init.text and .exit.text ines, of course, aren't in kallsyms, so I left
these cases just as extra info in verbose mode.

The end of the sections also aren't in kallsyms, so we the symbols layer does
another pass and sets the end addresses as the next map start minus one, which
sometimes pads, causing harmless mismatches.

But at least the symbols match, tested it by copying /proc/kallsyms to
/tmp/kallsyms and doing changes to see if they were detected.

This first test also should serve as a first stab at documenting the
symbol library by providing a self contained example that exercises it
together with comments about what is being done.

More tests to check if actions done on a monitored app, like doing mmaps, etc,
makes the kernel generate the expected events should be added next.

Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-04-29 18:59:23 -03:00
..
asciidoc.conf
examples.txt perf: Rename perf-examples.txt to examples.txt 2009-08-17 10:43:42 +02:00
Makefile perf: Make the install relative to DESTDIR if specified 2010-03-11 14:08:11 +01:00
manpage-1.72.xsl
manpage-base.xsl
manpage-bold-literal.xsl
manpage-normal.xsl
manpage-suppress-sp.xsl
perf-annotate.txt
perf-archive.txt perf archive: Add documentation 2010-01-20 08:54:58 +01:00
perf-bench.txt perf: cleanup some Documentation 2010-04-08 11:34:26 -03:00
perf-buildid-cache.txt perf buildid-cache: Add new command to manage build-id cache 2010-01-21 08:31:29 +01:00
perf-buildid-list.txt perf buildid-list: Always show the DSO name 2009-11-17 07:19:54 +01:00
perf-diff.txt perf diff: Use perf_session__fprintf_hists just like 'perf record' 2009-12-16 16:53:37 +01:00
perf-help.txt
perf-kmem.txt perf kmem: Show usage if no option is specified 2009-12-10 08:30:27 +01:00
perf-kvm.txt perf: Some perf-kvm documentation edits 2010-04-24 03:50:49 +02:00
perf-list.txt
perf-lock.txt perf lock: Fix and add misc documentally things 2010-02-27 17:05:22 +01:00
perf-probe.txt perf probe: Add --max-probes option 2010-04-26 15:35:20 -03:00
perf-record.txt perf: Always record tracepoints raw samples from perf record 2010-04-15 04:12:52 +02:00
perf-report.txt perf diff: Use perf_session__fprintf_hists just like 'perf record' 2009-12-16 16:53:37 +01:00
perf-sched.txt perf: cleanup some Documentation 2010-04-08 11:34:26 -03:00
perf-stat.txt perf stat: Fix tool option consistency: rename -S/--scale to -c/--scale 2009-08-09 12:54:37 +02:00
perf-test.txt perf test: Initial regression testing command 2010-04-29 18:59:23 -03:00
perf-timechart.txt perf timechart: Add a process filter 2009-10-20 07:55:50 +02:00
perf-top.txt perf top: Teach it to autolocate vmlinux 2010-02-04 09:33:28 +01:00
perf-trace-perl.txt perf/scripts: Tag syscall_name helper as not yet available 2010-02-25 04:07:50 +01:00
perf-trace-python.txt perf/scripts: Tag syscall_name helper as not yet available 2010-02-25 04:07:50 +01:00
perf-trace.txt perf/scripts: Add perf-trace-python Documentation 2010-02-25 04:07:49 +01:00
perf.txt perf: Fix few typos + cosmetics 2010-01-13 17:39:44 +01:00