Comments
Sort by recent activity
That certainly does sound like an unusually high amount of overhead.
Are you using a virtualized environment? Some VM implementations don't provide a very efficient way of reading the CPU time stamp counter which can have a negative effect on the performance of the profiler. A warning is written to the log file if this is detected.
On XP you should be able to find this in C:\Documents and Settings\<user name>\Local Settings\Application Data\Red Gate\ANTS Performance Profiler 4. The message will read something like "Profiler overhead calculated as 2435 ticks when making a method call, and 2300 ticks to the method prologue/epilogue. These values appear to be too high, so corrections made to this data may not be very accurate." (Running natively, the overhead is typically around 10-80 ticks depending on CPU type, and no message is added if it is in this range)
Also, are you using .NET 1.1? The profiler API available in that version of .NET is much less efficient than the one introduced into .NET 2.0. For many applications you can work around this by forcing them to run using the .NET 2.0 framework while profiling using an application config file. / comments
That certainly does sound like an unusually high amount of overhead.
Are you using a virtualized environment? Some VM implementations don't provide a very efficient way of reading the CPU time stam...
As Stephen said, using a less detailed profiling mode will help a lot - in particular turning off line-level timing.
One other thing that might help is to turn on the 'enable inlining' option in the options dialog: this does reduce the detail that the profiler can record but can have a significant effect on application performance. We're changing this to be the default in version 5. / comments
As Stephen said, using a less detailed profiling mode will help a lot - in particular turning off line-level timing.
One other thing that might help is to turn on the 'enable inlining' option in th...
Ah, I think I see what's going on here: the profiler can't find any debugging symbols for the service so it doesn't think that any methods have source code associated with them.
You should be able to switch the Display drop-down to show all methods in order to see the missing methods: you'll see all the framework calls as well, so the results can get a little cluttered.
To enable the profiler to identify methods with source, you'll need to put the .pdb files generated when you compiled it in the same directory as your service: they will show up in bold when the profiler can identify them. / comments
Ah, I think I see what's going on here: the profiler can't find any debugging symbols for the service so it doesn't think that any methods have source code associated with them.
You should be able ...
'Thread blocked' is the time a thread spends inactive, waiting to be woken up (eg, because it is waiting for IO to complete, some user interaction or for a lock to be acquired). It's not time spent running on the CPU and is often not very interesting in terms of performance, so you can select 'CPU time' to eliminate this time from the results. You can also use the thread drop down to focus on individual threads.
In this case, I think you're seeing one of the garbage collection threads waiting to be activated. A top-level 'thread blocked' like this indicates a sleeping .NET thread that isn't running any .NET code at all. / comments
'Thread blocked' is the time a thread spends inactive, waiting to be woken up (eg, because it is waiting for IO to complete, some user interaction or for a lock to be acquired). It's not time spen...
The intended behaviour hasn't really changed between the two versions, but ANTS 4 is very much faster than ANTS 3 and we took advantage of that to capture much more detail about the application being profiled.
The Time measurement is intended to be the time spent exclusively in a certain method, excluding any methods that it calls (framework or otherwise). However, ANTS 3 did not measure the time spent in methods without source by default, so these would be measured as part of the method that made the call: this made the Time measurement inaccurate in the older version of the profiler.
Time with children is the actual overall amount of time spent running a method. It's the best indication of which methods 'feel slow'. You may want to play with the CPU/wallclock time setting depending on what your application is doing to get the best view of the results. ANTS 3 didn't have this option and always showed wallclock time.
ANTS 4 does have a similar feature, you can set it to profile only methods with source, and it will show timings in the same way as before if you choose this option. However, as there is much less detail, there will be no indication of why a particular method is slower, and ANTS 4 doesn't have line-level timing support in this mode.
We've added a much better way of exploring how functions relate to each other, though, in the form of the call graph. If you've found that the Select method is taking a lot of time, but want to relate it to your code, you can click the call graph icon next to the call and expand it upwards to find your methods: if it's called from many different places, you will see all of them drawn out as a tree and how much time each of your methods is spending in the Select call. / comments
The intended behaviour hasn't really changed between the two versions, but ANTS 4 is very much faster than ANTS 3 and we took advantage of that to capture much more detail about the application bei...
Does the service show up as running when you refresh the service list? The profiler does have to restart the service in order to profile it, and the 'starting service' message is usually displayed while the service is running but is not providing any profiling data yet.
Depending on how the service and security is set up on your system, it is possible that the profiler isn't starting because of a permissions issue. The cheapest way to get around it is to reconfigure the service to run as LocalSystem. If you don't want to do that, there are a couple of things to check:
* The service must be able to read from the ANTS Profiler directory in Program Files in order to load in the ProfilerCore DLL.
* The service and the profiler must be able to agree upon a place where they can both read and write files. Normally, ANTS will use whatever the service has configured as a temp directory, but you can configure a specific location by setting the RGTEMP variable in your environment before starting the profiler. Set it to a directory that both your user and the user that the service runs as can write to. / comments
Does the service show up as running when you refresh the service list? The profiler does have to restart the service in order to profile it, and the 'starting service' message is usually displayed ...