gprof symspec 包括 C++类函数

发布于 2024-12-06 01:25:34 字数 331 浏览 4 评论 0原文

我正在尝试分析大型 C++ 程序的特定部分。我正在使用 gprof 和 Gprof2Dot 生成漂亮的图表。但是,我想从图中排除某些启动函数。

我认为我应该能够运行 gprof -Qclass::init 来抑制 class::init 及其所有子级,但这似乎不起作用。事实上,我无法让任何包含“::”的“symspec”工作。不过,-Qmain 按我的预期工作。

需要使用哪些技巧才能让 gprof 包含/排除带“::”的函数名称?

I'm trying to profile a particular portion of a large C++ program. I am using gprof and Gprof2Dot to generate nice graphs. However, I would like to exclude certain startup functions from the graph.

I thought I should be able to run gprof -Qclass::init to supress class::init and all its children, but that doesn't seem to be working. In fact, I can't get any "symspec" containing "::" to work. -Qmain works as I expect, however.

What magic tricks need to be done to get gprof to include/exclude function names with "::"?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文