Fully featured low overhead profiler for Java EE and Java SE platforms.
Ultimate profiling and monitoring solution for Gradle, Maven, Ant, JUnit and TestNG.
Easy to use performance and memory profiler for .NET framework.

Profiler gathers no information

Moderators: Vladimir Kondratyev, Anton Katilin

Profiler gathers no information

Postby andnaess » Tue May 27, 2008 8:36 am

Hi

I've got a small console app in VS2008 that I'm using to benchmark some code. Unfortunately YourKit doesn't give any information. I first tried just running the app (no debug), but it didn't even show up in the list of apps in YourKit. (I had set application startup to tracing). Next I started the application with debugging, and this time it showed up, but when I connected to it and saved the output there were almost nothing in the method list.

As a final attempt, I rewrote the main method as an infinite loop and added a breakpoint at the first line. As soon as the breakpoint was hit I connected to the app in YourKit, and let it loose. It ran, and the CPU chart in YourKit showed the CPU doing lots of work. Then I did "Capture snapshot".

But the snapshot still contains NO trace of my code. This is typically what it looks like (Call tree by thread):

Name Time (ms)
Unnamed#1
78 100 %
System.AppDomain.SetDefaultDomainManager(String, String[], String[])
78 100 %
vshost.RunParkingWindow
31 100 %
System.Threading.ThreadHelper.ThreadStart()
31 100 %
.NET SystemEvents
15 100 %
System.Threading.ThreadHelper.ThreadStart()
15 100 %

The method list contains two methods:

System.AppDomain.SetDefaultDomainManager(String, String[], String[])
System.Threading.ThreadHelper.ThreadStart()

What's going on?
andnaess
 
Posts: 2
Joined: Tue May 27, 2008 8:05 am

Postby Vladimir Kondratyev » Tue May 27, 2008 8:46 am

andnaess, profiler shows only methods which consume more than 1 ms of CPU time. All other methods are filtered. If your test is very short then it's possible that it's the reason.

The second reason why some methods can be invisible is "Filters". Please read about filters in the Help http://www.yourkit.com/docs/net30/help/filters.jsp.

Otherwise, please send us your test application to support(at)yourkit.com

Best regards,
Vladimir Kondratyev
YourKit, LLC
http://www.yourkit.com
"Don't get lost in data, get information!"
Vladimir Kondratyev
 
Posts: 1444
Joined: Tue Aug 10, 2004 7:52 pm
Location: Düsseldorf, Germany

Postby andnaess » Tue May 27, 2008 8:57 am

Thanks for a quick answer.

Filters. That was the problem. YourKit by default collapses methods that run under the "System" namespace. But when I run a main() from VS2008, it is executed by System.AppDomain.ExecuteAssembly(), and all my code is thus lost. Maybe you should warn about this, or include it in your manual? I would guess that a lot of people would use the Console Application project to quickly test some code, like I did.
andnaess
 
Posts: 2
Joined: Tue May 27, 2008 8:05 am


Return to .NET Profiler

Who is online

Users browsing this forum: No registered users and 2 guests

cron