] /opt/valgrind/bin/valgrind --tool=cachegrind./w-rpc

] /opt/valgrind/bin/valgrind --tool=cachegrind./w-rpc

我是 Valgrind 工具的新手,我正在使用交叉编译的 valgrind 和 ARM 目标板来运行我的可执行文件。在使用我的可执行文件执行 cachegrind 工具时,它成功生成了如下所示的 cachegrind.out.PID 文件

] /opt/valgrind/bin/valgrind --tool=cachegrind./w-rpc

从中生成的文件名为 cachegrind.out.29271。

由于我的目标板不支持 perl,我无法在目标板上运行 cg_annotate。因此,我在我的目标板上使用此 cachegrind.out.29271 运行此 cg_annotate 文件Ubuntu机器。但每次都只显示以下信息。我看不到详细的源代码分析信息,这是版本不匹配的问题还是我遗漏了什么。请为我提出解决方案,我真的很困惑,尝试了 valgrind 文档中提供的几乎所有可能的解决方案。

以下是我从 cachegrind.out.29271 文件中看到的信息,报告末尾显示“未收集 /home/radhar/myshare/PB_Test/c_RPCMonitor.cc 的信息”,请参见下文

$  cg_annotate   cachegrind.out.29271 /home/radhar/myshare/PB_Test/c_RPCMonitor.cc

I1 cache:         16384 B, 64 B, 4-way associative
D1 cache:         16384 B, 64 B, 4-way associative
LL cache:         262144 B, 64 B, 8-way associative
Command:          ./w-rpc_exit
Data file:        cachegrind.out.29271
Events recorded:  Ir I1mr ILmr Dr D1mr DLmr Dw D1mw DLmw
Events shown:     Ir I1mr ILmr Dr D1mr DLmr Dw D1mw DLmw
Event sort order: Ir I1mr ILmr Dr D1mr DLmr Dw D1mw DLmw
Thresholds:       99 0 0 0 0 0 0 0 0
Include dirs:     
User annotated:   /home/radhar/myshare/PB_Test/c_RPCMonitor.cc 
Auto-annotation:  off 

Ir   I1mr  ILmr        Dr    D1mr   DLmr        Dw  D1mw  DLmw 

38,385,638 14,462 4,450 5,369,475 159,757 63,018 1,424,411 2,155 1,337  PROGRAM TOTALS 

Ir  I1mr  ILmr        Dr   D1mr   DLmr      Dw D1mw DLmw  file:function 

26,263,438   238    23 1,398,703 59,346 15,533 237,160   30   13  ???:_dl_lookup_hash 
 9,128,805 6,745 2,174 2,919,360 92,571 43,596 511,921  776  396  ???:??? 
   320,759    58    12   105,071    108      0  72,599    2    0  ???:pthread_mutex_unlock 
   293,044   493    10    91,275    252     13  86,395   26    3  ???:pthread_mutex_lock 
   232,047    33     2   122,130     47      0  36,639    0    0  ???:OMTimerManager::lock() const 
   232,028    27     2   122,120      0      0  36,636    0    0  ???:OMTimerManager::unlock() const 
   185,511    24     2    68,015     37      2  68,018    0    0  ???:pthread_setcanceltype 
   164,862    88     4    48,848      0      0  24,424    0    0  ???:OMTimerManager::post() 
   146,544    47     3    73,272      0      0  24,424    0    0  ???:OMTimerManager::timeTickCbk() 
   134,355    73     5    67,171     18      0  61,074    0    0  ???:nanosleep 
   122,150    14     0    36,645      0      0  36,645    0    0  ???:LinuxMutex::unlock() 
   122,150    12     1    36,645      0      0  36,645    0    0  ???:LinuxMutex::lock() 
   100,373    41    40     3,903     15     10  16,463  235  234  ???:_dl_load_elf_shared_library 
    97,252   875    55    28,280    566     37  12,461  518  371  ???:malloc 
    91,605    25     3    24,426     31      0       3    0    0  ???:LinuxTimer::waitThread() 
    79,391    35     2    18,321      0      0  12,214    0    0  ???:OMUHeap::isEmpty() const 
    67,166    37     1    30,530     50      2   6,106    0    0  ???:OMThread::isEndOfProcess() 
    55,240     0     0         0      0      0  13,810    1    0  ???:__pthread_unlock 
    54,954    37     2    18,318      0      0  18,318    0    0  ???:OMTimerManager::cbkBridge(void*) 
    35,557     6     6    11,905  2,079  2,050   5,948    5    5  ???:_dl_fixup 
    27,620    17     6         0      0      0       0    0    0  ???:__pthread_lock 
    26,996     4     2    14,292      0      0   9,528    2    0  ???:_pthread_cleanup_pop_restore 
    25,552   162    18    12,865    117     16   7,883    8    0  ???:free 

User-annotated source: /home/radhar/myshare/PB_Test/c_RPCMonitor.cc 

No information has been collected for /home/radhar/myshare/PB_Test/c_RPCMonitor.cc 

我正好需要看源文件(包含很多函数)的详细分析报告……?

提前感谢您的时间和帮助,

拉蒂什

相关内容