android perf报告perf.data文件没有样本

时间:2015-11-14 06:33:31

标签: android perf

我尝试在android上使用perf

android是使用userdebug模式构建的。

使用$ ANDROID_SRC / external下的源代码构建perf,我将其推送到/ data

是否由我未启用的内核中的某些配置或选项引起?

还是缺少一些符号?

THX

root@s3gr20m6s:/data # ./perf record -p 4003                                   
^C[ perf record: Woken up 1 times to write data ]
[perf record: Captured and wrote 0.746 MB perf.data (~32610 samples) ]

root@s3gr20m6s:/data # ./perf report                                           
Error:
The perf.data file has no samples!
# ========
# captured on: Fri Dec 31 20:03:35 1999
# hostname : localhost
# os release : 3.14.41-i386-00011-g653e4cf
# perf version : perf.3.12_android
# arch : i686
# nrcpus online : 4
# nrcpus avail : 4
# cpudesc : Genuine Intel(R) CPU @ 728
# total memory : 948656 kB
# cmdline : /data/perf record -R -p 4003 
# event : name = cycles, type = 0, config = 0x0, config1 = 0x0,    config2 = 0x0, excl_usr = 0, excl_kern = 0, excl_host = 0, excl_guest = 1, precise_ip = 0, attr_mmap2 = 0, attr_mmap  = 1, attr_mmap_data = 0
# HEADER_CPU_TOPOLOGY info available, use -I to display
# pmu mappings: cpu = 4, software = 1, tracepoint = 2, breakpoint = 5

The perf.data file has no samples!

1 个答案:

答案 0 :(得分:1)

尝试添加-e cpu-clock它可能无法访问硬件配置文件事件,并且只能使用软事件。我至少在VM上看过这个。