簡體   English   中英

鏈接適用於aarch64的Google性能工具

[英]Linking google perf tools for aarch64

我已經在我的PC上成功使用了Google性能工具。 但是,我正在為aarch64體系結構進行編譯和部署,並且針對x86獲得的性能分析結果可能與aarch64不匹配。

我想直接在aarch64設備上進行測量。 我使用RelWithDebInfo標志進行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 PC上,我在編譯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?

這似乎是調試信息問題。 也許如果您可以提供小的測試程序以及如何運行它的確切細節,我將可以為您提供幫助。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM