English 中文(简体)
阅读水平
原标题:thread level memory consumption of process
  • 时间:2009-10-14 16:59:33
  •  标签:

How do I get per thread based memory consumption of a process in Linux? I understand that we can use /proc/pid/task/tid/statm, but thats not helping my case. All the threads show same value and its same as PID s statm.

We can do valgrind but I am not looking for any invalid read/write or leaks. Valgrind will not tell me any thread level info.

任何其他建议?

EDIT: How do I profile my code? How much memory was allocated in which function/line number etc.?

最佳回答

所有的透镜都拥有相同的地址空间,并使用同样的斜坡,因此,除其 st外,它们都应显示同样的记忆使用。

问题回答

有了一种选择,即看到pu和记忆的接近水平使用。

您可使用<条码>、和<条码>。

top -H -p<PID>

指挥部将列出结果,列出以下负责人,并读到PID,作为TID(Thread id)。

PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND`

在java进程的情况下,情况非常明显。 如果你制造一个工艺的胎面堆放场,将胎面id转换为 de,那么你可以与在<代码>top-H-p <PID>产出中开列的技术数据库相匹配。

页: 1





相关问题
热门标签