有没有非常困的分析器教程?
我用 C 创建了一个简单的程序,打印“Hello world”1000 次。现在我想测试非常昏昏欲睡的探查器,但它看不到进程中正在运行的程序。 我在调试模式 Visual Studio 2010 下运行该应用程序。
I've created a simple program printing "Hello world" 1000 times in C. Now I want to test very sleepy profiler, but it doesn't see the running program among processes.
I run the application in the debug mode, visual studio 2010.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
或者,您也可以先启动分析器,然后通过文件/启动运行您的程序...
无耻插件:您可以使用“非常困”的修改版本,它允许您在分析暂停的情况下启动分析目标,并使用允许您在此处以编程方式启动/停止分析的 API:http://hoffesommer.com/weblog/2011/06/17/very-sleepy-0_7_2-cpp-profiler-now-with-api/
Alternatively you can also launch the profiler first, then run your program via File/Launch...
Shameless plug: You can use the modified version of 'Very sleepy' that allows you to start the profiling target w/ profiling paused, and with an API that allows you to start/stop profiling programmatically here: http://hoffesommer.com/weblog/2011/06/17/very-sleepy-0_7_2-cpp-profiler-now-with-api/
如果您使用的是 Vista 或 Windows 7,您可能需要以管理员身份运行 Very Sleepy,以便它可以查看(并列出)该进程。
If you're using Vista or Windows 7, you may need to run Very Sleepy as an Administrator so it can see (and list) the process.
我建议您使用进程资源管理器。在启动程序之前启动它,您将看到它出现在列表中,并通过属性了解它的标识符,甚至是它的线程(如果您愿意)。
因此,当您启动 sleepy 时,您将准确地找到您正在寻找的 PID 和 TID。
I would suggest you to use process explorer. Launch it before you launch your program, and you will see it appearing on the list, and know its identifier, and even its threads if you wish it, by going to properties.
So when you launch sleepy, you will exactly now the PID and TID you are looking for.