【问题标题】:Linking google perf tools for aarch64为 aarch64 链接 google perf 工具
【发布时间】:2018-02-21 14:01:43
【问题描述】:

我已经在我的电脑上成功使用了 google perf 工具。但是,我正在为 aarch64 架构进行编译和部署,而我为 x86 获得的分析结果可能与 aarch64 不匹配。

我想直接在 aarch64 设备上进行测量。我使用RelWithDebInfo 标志编译,我使用分析器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 电脑上,我在编译谷歌性能工具后尝试链接 -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?

【问题讨论】:

    标签: c++ profiler gperftools


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2010-11-04
      • 2017-10-20
      • 2013-11-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-12-07
      • 2015-06-14
      相关资源
      最近更新 更多