【问题标题】:How do I exclude stuff from gprof output?如何从 gprof 输出中排除内容?
【发布时间】:2011-02-23 18:40:21
【问题描述】:

我正在尝试分析我拥有的应用程序,但我不希望与 UI 相关的任何内容(在 wxWidgets 中制作)出现在 gprof 的调用图中等。我该怎么做?

【问题讨论】:

  • 附加信息:我在 Windows XP 上,使用 MinGW gcc 和 gprof。
  • FWIW,我不会尝试将 gprof 用于任何严重的事情。检查此链接:stackoverflow.com/questions/1777556/alternatives-to-gprof/…
  • 是的,我真的不会将它用于任何严肃的事情。更多是为了了解经常被调用的内容。我正在做一个不容易分析的嵌入式系统,所以我打算在 PC 上使用 gprof 来了解从哪里开始真正测量。无论如何,我似乎无法使用 gprof,因为它在 Windows 上的多线程应用程序中不起作用。
  • 这里讨论了我自己对嵌入式系统的一些经验:stackoverflow.com/questions/890222/…

标签: gcc gprof


【解决方案1】:

来自 gprof 手册页:

   -E name
          suppresses the displaying of the graph profile entry for routine
          name  (and  its descendants) as -e, above, and also excludes the
          time spent in name (and its descendants) from the total and per-
          centage  time  computations.  (For example, -E mcount and all of
          the other monitor(3) routines are excluded by default.)

【讨论】:

  • 这不起作用。我曾尝试使用此选项,但它仍会打印该功能。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多