AQTime has a free version of its latest profiler (http://smartbear.com/products/free-tools/aqtime-standard/) It supports .Net 4, but I doubt that it can run a mixed Native and Managed profile.
If you are really serious about this, you can check out Microsoft xperf tools (http://msdn.microsoft.com/en-us/performance). They have a steep learning curve, but they are free, and I doubt that any commercial profiler can do what xperf can do (the devices are in the OS, not in a separate process, so Vista, win7 or win2K8 are required). I am waiting for someone to write a beautiful graphical interface around him, but he will drag out a bit ...; -)
xperf will profile your own code, and you can upload your characters to the result viewer. However, I do not think that this will decrease to the level of detail. This has a .Net CLR Provider (http://msdn.microsoft.com/en-us/library/dd264809.aspx). The great thing about xperf is that it can also show other processes that may affect your performance (you can disable it and only profile your own process). For example: it is able to show that your IO is slow due to a poorly written USB driver, antivirus scanner, or firewall software. A traditional profiler will only show slow I / O, forcing you to focus on a non-bottleneck.
By the way, there is also an ICorProfilerCallback interface that you can use to write your own profiler (http://msdn.microsoft.com/en-us/library/s5ec0es1.aspx).
source share