gprof 和可执行文件的参数

发布于 2024-07-16 09:22:29 字数 282 浏览 4 评论 0原文

使用 gprof 时:

$ gprof options [executable-file [profile-data-files...]] [> outfile]

如果您有选项传递给可执行文件,例如:

gprof a.out --varfred=32

那么 gprof 假定我向其传递无效选项,而不是传递给正在分析的程序 (a.out)。

有办法解决这个问题吗?

when using gprof:

$ gprof options [executable-file [profile-data-files...]] [> outfile]

if you have options to pass to the executable like:

gprof a.out --varfred=32

then gprof assumes that I am passing an invalid option to it, instead of to the program being profiled (a.out).

Any way to get around this?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

寒尘 2024-07-23 09:22:29

您不使用 gprof 运行可执行文件,因此您只需指定它以便 gprof 可以加载符号。 您首先像平常一样单独运行可执行文件,然后它会发出分析数据。

稍后,gprof 会加载该数据以及可执行文件。

当然,这一切都在 gprof 手册中进行了解释。

You don't run your executable with gprof, so you only specify it so gprof can load symbols. You run the executable first, on its own just as normal, and it then emits profiling data.

This data is loaded, along with the executable, by gprof later.

This is all explained in the gprof manual, of course.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文