我已经在我的pc上成功地使用了google perf工具。然而,我正在为aarch64架构编译和部署,我为x86获得的分析结果可能与aarch64不匹配。
我想直接测量aarch64设备上的东西。我使用RelWithDebInfo标志进行编译,使用profiler LD_PRELOAD的运行时链接来运行代码。
在我的第一次尝试中,大多数情况下我得到的是地址而不是函数名:
828 2.1% 86.0% 828 2.1% 0x0000007fa4ededb8
827 2.1% 88.1% 827 2.1% 0x0000007fa4edcf5c
641 1.6% 89.8% 641 1.6% 0x0000007fa4edcf6c
600 1.5% 91.3% 600 1.5% 0x0000007fa4ededc4
413 1.1% 92.4% 413 1.1% 0x0000007fa4edec5c不过,我得到了一些函数的真实函数名。
不推荐使用LD_PRELOAD选项。在我的x86 pc上,我尝试在编译完谷歌性能工具后链接到-lprofiler option,做了以下操作:
./configure --prefix [AARCH64_LIBPATH] --host aarch64-gnu-linux
make && sudo make install当我尝试make我的代码时,我得到了以下错误:
skipping incompatible [AARCH64_LIBPATH]/libprofiler.so when searching for -lprofiler
[SOME_AARCH64_PATH]/ld: cannot find -lprofiler如何使用谷歌性能工具在aarch64设备上评测CPU?
发布于 2017-09-17 05:42:47
这似乎是调试信息问题。也许如果你能提供小的测试程序和你如何运行它的确切细节,我将能够提供帮助。
https://stackoverflow.com/questions/46187705
复制相似问题