好的免费分析器,支持MingW32吗? [英] Good free profiler that supports MingW32 please?

查看:84
本文介绍了好的免费分析器,支持MingW32吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在另一个线程中询问了如何对我的资料进行概要分析,人们给了我很多答复,不同之处在于,当我尝试使用多个免费概要分析器(例如AMD Codeanalyst)时,它们仅支持Microsoft PDB格式,并且MingW无法生成这些.

I asked in another thread, how to profile my stuff, and people gave me lots of good replies, except that when I tried to use several of free profilers, including AMD Codeanalyst for example, they only support Microsoft PDB format, and MingW is unable to generate those.

那么,什么探查器可以帮助我使用Lua脚本探查多线程应用程序并使用MingW进行编译?

So, what profiler can help me profile a multi-threaded application with Lua scripting and is compiled with MingW?

gprof很糟糕,说出我为什么不想要的遮阳棚就在当下...如果我发现所有它麻烦的功能,则其中没有一个与该问题有关我有(有某些动作会导致速度大幅下降,我不知道为什么,而gprof也不知道)

gprof is crap, the awnser that says why I don't want it, is right on the spot... If I get all the functions that it litsts as troublesome, NONE of them are related to the issue that I have (there are a certain action that causes a massive slowdown, and I can't figure why, and gprof can't figure it either)

推荐答案

如果您不想使用 gprof ,请我并不感到惊讶.

花了我一段时间才能弄清楚如何在GDB下执行此操作,但这是我的工作.使应用程序运行,并将焦点转移到应用程序的输出窗口,即使它只是一个DOS盒.然后我按下Control-Break键(速度很慢).然后GDB暂停,我做了信息线程,它告诉我有哪些线程,通常是1和2.我切换到我想要的线程,例如线程2 .然后,我做 bt 来查看堆栈跟踪.这准确地告诉我当我按下Control-Break时在做什么.我多次执行此操作,例如10或20次,如果存在性能问题,无论它是什么,它都会在堆栈的多个样本中显示.制作程序的速度越慢,我看到它之前必须进行的采样越少.

It took me a while to figure out how to do this under GDB, but here's what I do. Get the app running and change focus to the app's output window, even if it's only a DOS-box. Then I hit the Control-Break key (while it's being slow). Then GDB halts and I do info threads and it tells me what threads there are, typically 1 and 2. I switch to the thread I want, like thread 2. Then I do bt to see a stack trace. This tells me exactly what it was doing when I hit Control-Break. I do this a number of times, like 10 or 20, and if there's a performance problem, no matter what it is, it shows up on multiple samples of the stack. The slower it makes the program, the fewer samples I have to take before I see it.

有关其工作方式和原因的完整分析,请参见该链接.

For a complete analysis of how and why it works, see that link.

P.S.启动GDB时,我还会处理SIGINT停止打印不通过.

P.S. I also do handle SIGINT stop print nopass when I start GDB.

这篇关于好的免费分析器,支持MingW32吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆