2017-09-13 99 views
0

我一直在我的电脑上成功地使用谷歌perf工具。但是,我正在为aarch64体系结构进行编译和部署,并且我为x86获得的分析结果可能与aarch64不匹配。为aarch64链接谷歌perf工具

我想直接测量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选项链接:

./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与谷歌perf工具?

回答

0

这看起来像调试信息问题。也许如果你能提供小测试程序和你如何运行它的确切细节,我将能够提供帮助。