码迷,mamicode.com
首页 > 其他好文 > 详细

perf 工具介绍3

时间:2015-11-06 22:31:20      阅读:281      评论:0      收藏:0      [点我收藏+]

标签:

http://blog.chinaunix.net/uid-10540984-id-3854969.html

http://blog.csdn.net/zhangskd/article/details/37902159

 

 

[root@localhost ~]# perf record -e cpu-clock ./t1
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.003 MB perf.data (~137 samples) ]
[root@localhost ~]# perf report
# Samples: 102
#
# Overhead  Command  Shared Object  Symbol
# ........  .......  .............  ......
#
    99.02%       t1  ./t1           [.] longa
     0.98%       t1  [kernel]       [k] do_page_fault

-----------------------------------------------------------------------------

 

usage: perf top [<options>]

    -e, --event <event>   event selector. use perf list to list available events
    -c, --count <n>       event period to sample
    -p, --pid <n>         profile events on existing pid
    -a, --all-cpus        system-wide collection from all CPUs
    -C, --CPU <n>         CPU to profile on
    -k, --vmlinux <file>  vmlinux pathname
    -m, --mmap-pages <n>  number of mmap data pages
    -r, --realtime <n>    collect data with this RT SCHED_FIFO priority
    -d, --delay <n>       number of seconds to delay between refreshes
    -D, --dump-symtab     dump the symbol table used for profiling
    -f, --count-filter <n>
                          only display functions with more events than this
    -g, --group           put the counters into a counter group
    -i, --inherit         child tasks inherit counters
    -s, --sym-annotate <symbol name>
                          symbol to annotate - requires -k option
    -z, --zero            zero history across updates
    -F, --freq <n>        profile at this frequency
    -E, --entries <n>     display this many functions
    -v, --verbose         be more verbose (show counter open errors, etc)

 

perf 工具介绍3

标签:

原文地址:http://www.cnblogs.com/zengkefu/p/4943769.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!