2013年7月2日 星期二

oprofile

  • Oprofile 包含在 Linux 2.5 和更高版本的内核中
編譯kernel:
General setup
            Kernel Performance Events And Counters     --->
                          -> Kernel performance events and counters   # CONFIG_PERF_EVENTS
            -> Profiling support  [*]                             # CONFIG_PROFILING
            -> OProfile system profiling  <*>            # CONFIG_OPROFILE
Kernel Features
            -> Enable hardware performance counter support for perf events [*]
            # CONFIG_HW_PERF_EVENTS

在menuconfig模式中,可以用"shift + ?"查詢.config與make menuconfig所設定的對應關係,也可以用"/"查詢.config的選項名稱。

opcontrol  --setup

oprofiled  --session-dir=/data/oprofile  --vmlinux=/vmlinux   \

--kernel-range=c00xxxxx,c0xxxxxx  --events=CPU_CYCLES:255:0:10000:1:1:1   \

--separate-lib=1  --separate-kernel=1


opcontrol  --setup  --vmlinux=/vmlinux  -kernel-range=c00xxxxx,c0xxxxxx    \

--event=CPU_CYCLES:10000:1:1:1

opcontrol --timer


沒有留言:

張貼留言