gpt4 book ai didi

c++ - gperftools cpuProfiler 在分析由 ARM 设备创建的文件时看不到符号

转载 作者:塔克拉玛干 更新时间:2023-11-03 07:21:14 27 4
gpt4 key购买 nike

我想分析一个在 ARM 设备中运行的 C++ 应用程序。我运行了我的应用程序并使用 ProfilerStart("googleProfBL.prof") 对其进行了分析,因此生成了文件。当我在本地计算机中从 ARM 设备打开文件时,我得到以下信息:



<p>./pprof --text --add_lib=libraryIwanttoDebug.so BinaryThatLoadsThatLibrary googleProfBL.prof
Using local file /home/genius/PresControler/src-build-target/deploy/NavStartup.
Using local file ../traces/googleProfBL.prof.
Warning: address ffffffffffffffff is longer than address length 8
Warning: address ffffffffffffffff is longer than address length 8
Hexadecimal number > 0xffffffff non-portable at ./pprof line 4475.
Hexadecimal number > 0xffffffff non-portable at ./pprof line 4475.
Total: 5347 samples
258 4.8% 4.8% 258 4.8% 0x76d4c276
144 2.7% 7.5% 144 2.7% 0x76da2cc4
126 2.4% 9.9% 126 2.4% 0x5d0f8284
114 2.1% 12.0% 114 2.1% 0x76d27386
64 1.2% 13.2% 64 1.2% 0x76dba2dc
53 1.0% 14.2% 53 1.0% 0x76dba1f4
...</p>

so库是在debug模式下编译的(没有剥离),不知道为什么收不到符号。

我试过这个:


./pprof --text --add_lib=aFileOfTheLibrary.o BinaryThatLoadsThatLibrary googleProfBL.prof
Looks like I got a couple of symbols.
Using local file /home/genius/PresControler/src-build-target/deploy/NavStartup.
Using local file ../traces/googleProfBL.prof.
Warning: address ffffffffffffffff is longer than address length 8
Warning: address ffffffffffffffff is longer than address length 8
Hexadecimal number > 0xffffffff non-portable at ./pprof line 4475.
Hexadecimal number > 0xffffffff non-portable at ./pprof line 4475.
Total: 5347 samples
258 4.8% 4.8% 258 4.8% 0x76d4c276
144 2.7% 7.5% 144 2.7% 0x76da2cc4
126 2.4% 9.9% 126 2.4% 0x5d0f8284
114 2.1% 12.0% 114 2.1% 0x76d27386
64 1.2% 13.2% 64 1.2% 0x76dba2dc
53 1.0% 14.2% 53 1.0% 0x76dba1f4
50 0.9% 15.1% 50 0.9% 0x76dbf1bc
34 0.6% 15.8% 34 0.6% 0x72eae1b4
30 0.6% 16.3% 30 0.6% 0x76d8a32a
30 0.6% 16.9% 30 0.6% 0x76d8e2c0
..
0 0.0% 100.0% 7 0.1% std::forward_as_tuple <- I couldn't see that before!!!
我尝试为我拥有的每个 .o 做--add_lib,但我没有得到更多的符号。为什么我没有得到符号,这与我使用英特尔检查结果并使用 ARM 获取它们有什么关系吗?我该如何解决?有帮助吗???谢谢!!!

最佳答案

我现在得到了更多信息!我正在按 ctrl+c 运行我的应用程序,所以文件以某种方式损坏了......我在按 ctrl+c 之前做了一个调用 ProfilerStop() 的测试,它起作用了(当然也使用了 --lib_prefix,其中 .so 是)。我仍然收到这些警告:
警告:地址 ffffffffffffffff 长于地址长度 8
警告:地址 ffffffffffffffff 长于地址长度 8
./pprof 第 4475 行的十六进制数 > 0xffffffff 不可移植。
./pprof 第 4475 行的十六进制数 > 0xffffffff 不可移植。
如果有人知道我为什么会收到它们(我假设是因为我正在调试由另一台设备生成的代码)请告诉我。

关于c++ - gperftools cpuProfiler 在分析由 ARM 设备创建的文件时看不到符号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26017728/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com