适用于 .NET 4.0 混合代码的免费 .NET Profiler

发布于 2024-11-17 23:18:01 字数 720 浏览 4 评论 0原文

我查看了此处提到的一些性能分析器。但是...

  • EQATec 对我不起作用,因为我有很多想要分析的程序集,并且它对要分析的程序集有限制。获得免费许可证有多麻烦?如果有人向我保证 EQATec 可以分析托管和非托管代码,我会去尝试
  • SlimTune 只分析我的托管代码,即使我将“分析本机函数”设置为“True”
  • XTE Profiler 不再免费
  • 我们有一个副本我们之前购买了AQTime 6,但它似乎不支持.NET 4.0应用程序(它甚至无法启动我的应用程序)
  • 我们使用Visual Studio 2010 Professional SP1,所以我们没有Visual工作室分析器
  • 我尝试了“穷人的分析”(多次停止程序并查看它在哪里),但我得到的结果太随机,而且我更习惯传统的分析

(我花了一整天的时间来思考这个问题) ,抱歉,如果我太消极了)

更新:在清理我的解决方案后,再次构建它并检查所有调试信息(.pdb)是否已复制到与可执行文件相同的目录中,我再次尝试了 AQTime 并成功了!它向我显示了托管和非托管代码的常规计时信息,因此我的问题得到了解决。但是,我使用的是付费分析器,因此这个问题将一直悬而未决,直到我查看 xperf 或有人提出其他建议

I checked out some of the performance profilers mentioned here. But...

  • EQATec didn't work for me because I have many assemblies I want to profile, and it has a limit on assemblies to profile. How much of a hassle is getting a free license? I'd go for it if someone guaranteed me that EQATec can profile both managed and unmanaged code
  • SlimTune only profiled my managed code, even if I set "Profile native functions" to "True"
  • XTE Profiler is no longer free
  • We have a copy of AQTime 6 we bought before, but it doesn't seem to support .NET 4.0 apps (it can't even start my app)
  • We use Visual Studio 2010 Professional SP1, so we don't have the Visual Studio profiler
  • I tried the "poor man's profiling" (halting the program many times and seeing where it is), but I get way too random results and I'm more used to traditional profiling

(I've spent the whole day stumped on this, sorry if I was too negative)

UPDATE: After I cleaned my solution, built it again and checked all debug info (.pdb) was copied to the same directory as the executable, I tried AQTime again and it worked! It showed me routine timing info for both managed and unmanaged code, so my problem is solved. However, I'm using a paid profiler, so the question will remain open until I take a look at xperf or someone comes up with something else

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

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

发布评论

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

评论(5

几度春秋 2024-11-24 23:18:01

AQTime 有一个免费版本的最新分析器(http://smartbear.com/products/free-tools/aqtime-standard/),它支持 .Net 4,但我怀疑它是否可以执行本机和托管的混合配置文件。

如果您真的对此很认真,您可以研究一下 Microsoft xperf 工具 (http://msdn.microsoft.com/en-us/performance)。它们有一个陡峭的学习曲线,但它们是免费的,我怀疑任何商业分析器都可以做 xperf 可以做的事情(检测位于操作系统中,而不是在单独的进程中,因此需要 Vista、win7 或 win2K8)。我正在等待有人围绕它编写一个漂亮的 GUI,但这需要一点时间...;-)

xperf 将分析您的本机代码,您可以将符号加载到结果查看器中。不过,我认为它不会降低到每行粒度。它有一个 .Net CLR 提供程序 (http://msdn.microsoft.com/en-us/library/dd264809.aspx)。 xperf 的一个很酷的事情是它还可以显示可能影响您性能的其他进程(您可以随意将其关闭并仅分析您自己的进程)。例如:它能够显示您的 IO 由于 USB 驱动程序、病毒扫描程序或防火墙软件编写不当而变慢。传统的分析器只会显示缓慢的 IO,导致您将注意力集中在非瓶颈上。

顺便说一句,还有一个 ICorProfilerCallback 接口,您可以利用它来编写自己的探查器 (http://msdn.microsoft.com/en-us/library/s5ec0es1.aspx)。

AQTime have a free version of their latest profiler (http://smartbear.com/products/free-tools/aqtime-standard/) It supports .Net 4, But I doubt it can do a mixed profile of Native and Managed.

If you are really serious about it you might look into the Microsoft xperf tools (http://msdn.microsoft.com/en-us/performance). They have a steep learning curve but they are free and I doubt any commercial profiler can do what xperf can (the instrumentation is in the OS, not in a separate process, thus either Vista, win7 or win2K8 are required). I'm waiting for someone to write a nice GUI around it, but it's taking a bit long... ;-)

xperf will profile your native code and you can load your symbols into the result viewer. I don't think it will go down to per-line granularity though. It has has a .Net CLR Provider (http://msdn.microsoft.com/en-us/library/dd264809.aspx). The cool thing about xperf is that it can also show other processes that may be influencing your performance (you are free to switch it off and only profile your own process). For example: it is capable of revealing that your IO is slow due to a badly written USB driver, virus scanner or firewall software. A traditional profiler would only show the slow IO, causing you to focus on a non-bottleneck.

By the way, there is also an ICorProfilerCallback interface you can utilize to write your own profiler (http://msdn.microsoft.com/en-us/library/s5ec0es1.aspx).

回首观望 2024-11-24 23:18:01

我很确定你的问题的答案是“没有”。

几个月前,在比较一大堆 .NET 分析器时,我发现只有极少数可以进行混合 .NET/本机分析:AQTime(599 美元)和 Glowcode(499 美元)可以。或者他们是这么说的——我没有尝试过。

EQATEC、Visual Studio、ANTS、Jetbrains dotTrace、Yourkit、XteProfiler、Slimtune 等都不能,所以我怀疑您很快就能找到一个免费的分析器。

I' pretty sure the answer to your question is "There isn't one".

In comparing a whole bunch of .NET profilers a few months ago I found only very few could do mixed .NET/native profiling: AQTime ($599) and Glowcode ($499) could. Or so they say - I didn't try it.

EQATEC, Visual Studio, ANTS, Jetbrains dotTrace, Yourkit, XteProfiler, Slimtune etc could not, so I doubt you'll find a free profiler anytime soon that can.

a√萤火虫的光℡ 2024-11-24 23:18:01

Microsoft 的 CLR Profiler 4 是免费的。你尝试过吗?

您在探查器的非托管部分中寻找什么?

CLR Profiler 4 by Microsoft is free. Have you tried it?

What do you look for in the unmanaged part of the profiler?

热风软妹 2024-11-24 23:18:01

您对 EQATEC Profiler 的担忧很容易得到解决:它只进行托管 .NET 分析,根本不进行任何类型的非托管分析。

定价中所示,实际分析功能仅在可分析的程序集数量上有所不同。立即进行分析。因此,0 美元的免费版对单一组件 WP7 应用程序的配置与 999 美元的企业版一样好。对于额外的价格标签,您可以一次分析更多组件和一些辅助功能,如打印、比较、最小/最大等。

通过 尝试 EQATEC Analytics 据说很容易。获取无限制的企业许可证是一个相当受欢迎的选择,许多人在短短几个小时内就获得了它。如果您足够优秀,获得 99 美元的免费标准许可证应该不会超过 10 分钟左右。请注意:我在 EQATEC 工作,实际上我们每天都会发放如此多的免费许可证,这几乎成为一种负担,因为每个许可证都是手动处理的(是的,认真的!),所以这个特殊的优惠可能不会永远持续下去。

Your concern about EQATEC Profiler is easily resolved: it only does managed .NET profiling, not at all any kind of unmanaged profiling.

As shown in the pricing the actual profiling functionality differs only in the number of assemblies that can be profiled at once. So a $0 Free edition profiles a single-assembly WP7-app just as fine as a $999 Corporate edition does. For the extra price tag you get to profile more assemblies at once and a handful secondary features, like print, compare, min/max etc.

Getting a free license by trying out EQATEC Analytics is said to be easy. Going for the unlimited Corporate license is quite a popular choice and many have achieved it in just a couple of hours. Getting a free $99 Standard license shouldn't take more than 10 minutes or so, if you're good. Please note: I work at EQATEC and we actually hand out so many free licenses every day now that's it's almost become a burden because each is manually processed (yes, seriously!) so this particular offer may not go on forever.

乞讨 2024-11-24 23:18:01

OP:“如果有人向我保证 XXXX 可以分析托管和非托管代码,我会选择它”

我们的 C# Timing Profiler 不依赖于 C# 代码的编译方式(托管、非托管或混合)。它应该可以正常工作。

OP: "I'd go for it if someone guaranteed me that XXXX can profile both managed and unmanaged code"

Our C# Timing Profiler is not dependent on how your C# code is compiled (managed or unmanaged, or mixed). It should work fine for this.

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