为aarch64

时间:2017-09-13 01:59:49

标签: c++ profiler gperftools

我一直在我的电脑上成功使用谷歌工具。但是,我正在为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个人电脑上,在尝试编写Google性能工具后,我尝试使用-lprofiler选项进行链接:

./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

如何使用google perf工具在aarch64设备上分析CPU?

1 个答案:

答案 0 :(得分:0)

这似乎是调试信息问题。也许如果您能提供小型测试程序以及如何运行它的确切细节,我将能够提供帮助。