我正在尝试在具有 PMU 支持的 aria10 fpga 板(带有 2 个 ARM Cortex A9 CPU)上分析我的用户空间程序。我正在运行 windriver linux 版本 9.x。我使用人们在互联网上建议的几乎所有 CONFIG_ 选项构建了我的内核。另外,我的 pgm 是使用 \xe2\x80\x93fno-omit-frame-pointer 和 \xe2\x80\x93g 选项编译的。
\n\n我看到的是 \xe2\x80\x98perf record\xe2\x80\x99 根本不生成任何样本。\xe2\x80\x98perf stat true\xe2\x80\x99 输出看起来是有效的(不知道从中可以得到什么)。有人有建议/想法为什么我没有看到生成任何样本吗?
\n\n~: perf record --call-graph dwarf -- my_app\n\n^C\n[ perf record: Woken up 1 times to write data ]\n[ perf record: Captured and wrote 0.003 MB perf.data ]\n\n~: perf report -g graph --no-children\nError:\nThe perf.data file has no samples!\n To display the perf.data header info, please use --header/--header-only options.\n\n~: perf stat true\n\n Performance counter stats for 'true':\n\n 1.095300 task-clock (msec) # 0.526 CPUs utilized \n 0 context-switches # 0.000 K/sec \n 0 cpu-migrations # 0.000 K/sec \n 22 page-faults # 0.020 M/sec \n 1088056 cycles # 0.993 GHz \n 312708 instructions # 0.29 insn per cycle \n 29159 branches # 26.622 M/sec \n 16386 branch-misses # 56.20% of all branches \n\n 0.002082030 seconds time elapsed\n
Run Code Online (Sandbox Code Playgroud)\n\n我在此设置中不使用虚拟机。Arria10是intel FPGA,带有2个ARM CPU,支持PMU。
\n\n编辑:\n1. 我现在意识到 ARM CPU 有 HW PMU 支持(与我之前提到的相反)。即使有 HW PMU 支持,我也无法成功进行“性能记录”。
\n这是一个老问题,但对于通过搜索找到此问题的人来说:
perf record -e cpu-clock <command>
Run Code Online (Sandbox Code Playgroud)
对我有用。问题似乎是默认事件(周期)不可用
归档时间: |
|
查看次数: |
3136 次 |
最近记录: |