forked from luck/tmp_suning_uos_patched
0d68bc92c4
The perf kmem command records and analyze kernel memory allocation only
for SLAB objects. This patch implement a simple page allocator analyzer
using kmem:mm_page_alloc and kmem:mm_page_free events.
It adds two new options of --slab and --page. The --slab option is for
analyzing SLAB allocator and that's what perf kmem currently does.
The new --page option enables page allocator events and analyze kernel
memory usage in page unit. Currently, 'stat --alloc' subcommand is
implemented only.
If none of these --slab nor --page is specified, --slab is implied.
First run 'perf kmem record' to generate a suitable perf.data file:
# perf kmem record --page sleep 5
Then run 'perf kmem stat' to postprocess the perf.data file:
# perf kmem stat --page --alloc --line 10
-------------------------------------------------------------------------------
PFN | Total alloc (KB) | Hits | Order | Mig.type | GFP flags
-------------------------------------------------------------------------------
4045014 | 16 | 1 | 2 | RECLAIM | 00285250
4143980 | 16 | 1 | 2 | RECLAIM | 00285250
3938658 | 16 | 1 | 2 | RECLAIM | 00285250
4045400 | 16 | 1 | 2 | RECLAIM | 00285250
3568708 | 16 | 1 | 2 | RECLAIM | 00285250
3729824 | 16 | 1 | 2 | RECLAIM | 00285250
3657210 | 16 | 1 | 2 | RECLAIM | 00285250
|
||
---|---|---|
.. | ||
android.txt | ||
asciidoc.conf | ||
Build.txt | ||
examples.txt | ||
jit-interface.txt | ||
Makefile | ||
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-bench.txt | ||
perf-buildid-cache.txt | ||
perf-buildid-list.txt | ||
perf-data.txt | ||
perf-diff.txt | ||
perf-evlist.txt | ||
perf-help.txt | ||
perf-inject.txt | ||
perf-kmem.txt | ||
perf-kvm.txt | ||
perf-list.txt | ||
perf-lock.txt | ||
perf-mem.txt | ||
perf-probe.txt | ||
perf-record.txt | ||
perf-report.txt | ||
perf-sched.txt | ||
perf-script-perl.txt | ||
perf-script-python.txt | ||
perf-script.txt | ||
perf-stat.txt | ||
perf-test.txt | ||
perf-timechart.txt | ||
perf-top.txt | ||
perf-trace.txt | ||
perf.txt | ||
perfconfig.example |