0

我想知道有任何命令或实用程序来检查 vxworks(目标板)中应用程序的运行时足迹。

而且我也想知道如何找到目标板的CPU使用率。

4

1 回答 1

5

不太清楚“运行时占用空间”是什么意思,但 ti 命令会显示特定任务的堆栈使用情况:

-> ti tNet0

  NAME         ENTRY       TID    PRI   STATUS      PC       SP     ERRNO  DELAY
----------  ------------ -------- --- ---------- -------- -------- ------- -----
tNet0       ipcomNetTask 1040fad0  50 PEND       1014c42b 1078ff10       0     0

full task name : tNet0
task entry     : ipcomNetTask
process        : kernel
options        : 0x9007
VX_SUPERVISOR_MODE  VX_UNBREAKABLE      VX_DEALLOC_STACK    VX_DEALLOC_TCB     
VX_DEALLOC_EXC_STACK

STACK      BASE     END       SP      SIZE    HIGH   MARGIN
--------- -------- -------- -------- ------- ------- -------
execution 10790000 10780000 1078ff10   65536    2404   63132
exception 10428fb8 10426030            12168     360   11808

对于 cpu 使用情况,请在 BSP 中启用 INCLUDE_SPY 并执行 spy 以开始显示 cpu 使用情况:

->spy 
    NAME         ENTRY       TID      PRI   total % (ticks)  delta % (ticks)
------------ ------------ ----------  ---   ---------------  ---------------
tJobTask     0x10098410   0x103eeb00    0     0% (       0)    0% (       0)
tExcTask     0x10097880   0x101d6560    0     0% (       0)    0% (       0)
tLogTask     logTask      0x103efa58    0     0% (       0)    0% (       0)
tShell0      shellTask    0x1058c5c8    1     0% (       2)    0% (       2)
tWdbTask     0x10141e80   0x104ae950    3     0% (       0)    0% (       0)
tSpyTask     spyComTask   0x1042ecb8    5     0% (       8)    0% (       2)
ipcom_tickd  0x10060090   0x1058fb50   20     0% (       0)    0% (       0)
tVxdbgTask   0x10051810   0x104ae658   25     0% (       0)    0% (       0)
tAioIoTask1  aioIoTask    0x1040df78   50     0% (       0)    0% (       0)
tAioIoTask0  aioIoTask    0x1040e3a0   50     0% (       0)    0% (       0)
tNet0        ipcomNetTask 0x1040fad0   50     0% (       0)    0% (       0)
ipcom_syslog 0x10055190   0x1042e5a8   50     0% (       0)    0% (       0)
tNetConf     0x100887e0   0x1044f8b8   50     0% (       0)    0% (       0)
tAioWait     aioWaitTask  0x1040aa40   51     0% (       0)    0% (       0)
KERNEL                                        0% (       0)    0% (       0)
INTERRUPT                                     0% (       0)    0% (       0)
IDLE                                         99% (    2495)   99% (     498)
TOTAL                                        99% (    2505)   99% (     502)

->spyStop
于 2013-04-17T13:03:21.353 回答