专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > VxWorks

vxworks上怎么查看任务的内存使用

发布时间:2010-06-14 16:39:21 文章来源:www.iduyao.cn 采编人员:星星草
vxworks下如何查看任务的内存使用
rt
请问命令是什么?谢谢
------解决方案--------------------
taskShow tShell, 1


taskShow()


The following example shows the TCB contents for the shell task:

taskShow() – display task information from TCBs
STATUS taskShow
(
int tid,  /* task ID */
int level /* 0 = summary, 1 = details, 2 = all tasks */
)
This routine displays the contents of a task control block (TCB) for a specified task. If leve
is 1, it also displays task options and registers.  If level is 2, it displays all tasks.
The TCB display contains the following fields:
Field Meaning
NAME Task name
ENTRY Symbol name or address where task began execution
TID Task ID
PRI Priority
STATUS Task status, as formatted by taskStatusString()
PC Program counter

NAME ENTRY TID PRI STATUS PC SP ERRNO DELAY
---------- --------- -------- --- --------- -------- -------- ------ -----
tShell _shell 20efcac 1 READY 201dc90 20ef980 0 0
stack: base 0x20efcac end 0x20ed59c size 9532 high 1452 margin 8080
options: 0x1e
VX_UNBREAKABLE VX_DEALLOC_STACK VX_FP_TASK VX_STDIO
D0 = 0 D4 = 0 A0 = 0 A4 = 0
D1 = 0 D5 = 0 A1 = 0 A5 = 203a084 SR = 3000
D2 = 0 D6 = 0 A2 = 0 A6 = 20ef9a0 PC = 2038614
D3 = 0 D7 = 0 A3 = 0 A7 = 20ef980
------解决方案--------------------
不一样吧!看注释。
checkStack()
checkStack() – print a summary of each task’s stack usage
void checkStack
(
int taskNameOrId /* task name or task ID; 0 = summarize all */
)
This command displays a summary of stack usage for a specified task, or for all tasks if no
argument is given.  The summary includes the total stack size (SIZE), the current number
of stack bytes used (CUR), the maximum number of stack bytes used (HIGH), and the
number of bytes never used at the top of the stack (MARGIN = SIZE - HIGH). For
example:
-> checkStack tShell
NAME         ENTRY      TID    SIZE   CUR  HIGH  MARGIN
------------ ------------ -------- ----- ----- ----- ------
tShell       _shell       23e1c78   9208   832  3632   5576
The maximum stack usage is determined by scanning down from the top of the stack for
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: