162306a36Sopenharmony_ciperf-kmem(1) 262306a36Sopenharmony_ci============ 362306a36Sopenharmony_ci 462306a36Sopenharmony_ciNAME 562306a36Sopenharmony_ci---- 662306a36Sopenharmony_ciperf-kmem - Tool to trace/measure kernel memory properties 762306a36Sopenharmony_ci 862306a36Sopenharmony_ciSYNOPSIS 962306a36Sopenharmony_ci-------- 1062306a36Sopenharmony_ci[verse] 1162306a36Sopenharmony_ci'perf kmem' [<options>] {record|stat} 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_ciDESCRIPTION 1462306a36Sopenharmony_ci----------- 1562306a36Sopenharmony_ciThere are two variants of perf kmem: 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ci 'perf kmem [<options>] record [<perf-record-options>] <command>' to 1862306a36Sopenharmony_ci record the kmem events of an arbitrary workload. Additional 'perf 1962306a36Sopenharmony_ci record' options may be specified after record, such as '-o' to 2062306a36Sopenharmony_ci change the output file name. 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_ci 'perf kmem [<options>] stat' to report kernel memory statistics. 2362306a36Sopenharmony_ci 2462306a36Sopenharmony_ciOPTIONS 2562306a36Sopenharmony_ci------- 2662306a36Sopenharmony_ci-i <file>:: 2762306a36Sopenharmony_ci--input=<file>:: 2862306a36Sopenharmony_ci For stat, select the input file (default: perf.data unless stdin is a 2962306a36Sopenharmony_ci fifo) 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ci-f:: 3262306a36Sopenharmony_ci--force:: 3362306a36Sopenharmony_ci Don't do ownership validation 3462306a36Sopenharmony_ci 3562306a36Sopenharmony_ci-v:: 3662306a36Sopenharmony_ci--verbose:: 3762306a36Sopenharmony_ci Be more verbose. (show symbol address, etc) 3862306a36Sopenharmony_ci 3962306a36Sopenharmony_ci--caller:: 4062306a36Sopenharmony_ci Show per-callsite statistics 4162306a36Sopenharmony_ci 4262306a36Sopenharmony_ci--alloc:: 4362306a36Sopenharmony_ci Show per-allocation statistics 4462306a36Sopenharmony_ci 4562306a36Sopenharmony_ci-s <key[,key2...]>:: 4662306a36Sopenharmony_ci--sort=<key[,key2...]>:: 4762306a36Sopenharmony_ci Sort the output (default: 'frag,hit,bytes' for slab and 'bytes,hit' 4862306a36Sopenharmony_ci for page). Available sort keys are 'ptr, callsite, bytes, hit, 4962306a36Sopenharmony_ci pingpong, frag' for slab and 'page, callsite, bytes, hit, order, 5062306a36Sopenharmony_ci migtype, gfp' for page. This option should be preceded by one of the 5162306a36Sopenharmony_ci mode selection options - i.e. --slab, --page, --alloc and/or --caller. 5262306a36Sopenharmony_ci 5362306a36Sopenharmony_ci-l <num>:: 5462306a36Sopenharmony_ci--line=<num>:: 5562306a36Sopenharmony_ci Print n lines only 5662306a36Sopenharmony_ci 5762306a36Sopenharmony_ci--raw-ip:: 5862306a36Sopenharmony_ci Print raw ip instead of symbol 5962306a36Sopenharmony_ci 6062306a36Sopenharmony_ci--slab:: 6162306a36Sopenharmony_ci Analyze SLAB allocator events. 6262306a36Sopenharmony_ci 6362306a36Sopenharmony_ci--page:: 6462306a36Sopenharmony_ci Analyze page allocator events 6562306a36Sopenharmony_ci 6662306a36Sopenharmony_ci--live:: 6762306a36Sopenharmony_ci Show live page stat. The perf kmem shows total allocation stat by 6862306a36Sopenharmony_ci default, but this option shows live (currently allocated) pages 6962306a36Sopenharmony_ci instead. (This option works with --page option only) 7062306a36Sopenharmony_ci 7162306a36Sopenharmony_ci--time=<start>,<stop>:: 7262306a36Sopenharmony_ci Only analyze samples within given time window: <start>,<stop>. Times 7362306a36Sopenharmony_ci have the format seconds.microseconds. If start is not given (i.e., time 7462306a36Sopenharmony_ci string is ',x.y') then analysis starts at the beginning of the file. If 7562306a36Sopenharmony_ci stop time is not given (i.e, time string is 'x.y,') then analysis goes 7662306a36Sopenharmony_ci to end of file. 7762306a36Sopenharmony_ci 7862306a36Sopenharmony_ciSEE ALSO 7962306a36Sopenharmony_ci-------- 8062306a36Sopenharmony_cilinkperf:perf-record[1] 81