Comments
Sort by recent activity
Value types like booleans won't show up in the memory profiler unless they have been boxed by .NET, as in all other cases they will be part of other classes and not visible as distinct objects.
A boxed boolean will have 8 bytes of .NET header, 1 byte of boolean and 3 bytes to make the size a multiple of 4 (exactly the same as a class containing a single boolean field). This makes them quite inefficient to store as objects - if you consider the fact that you also need to have at least one reference to this boolean the total memory required is actually 16 bytes per boolean. / comments
Value types like booleans won't show up in the memory profiler unless they have been boxed by .NET, as in all other cases they will be part of other classes and not visible as distinct objects.
A b...
I haven't seen this when trying out the duck typing library myself. Generated code shouldn't cause a problem with the profiler.
It's possible that the profiler doesn't have enough memory to use in the process being profiled: this is currently the only way we know of that will cause this error, and only really applies to 32-bit systems. You can check for this in task manager: in general if the process is starting to use more than 1Gb of RAM or so it becomes possible for the profiler to be unable to find the memory it needs to continue.
You can reduce the memory consumption of the process being profiled by reducing the detail level when starting it: method-level only and only methods with source both require fewer resources than line-level timing. You should also make sure that the 'simplify complex stack traces' and 'ignore extremely trivial functions' options are on: these options both try to discard results that are unlikely to be interesting yet require a disproportionate amount of storage to process.
If this issue doesn't appear to be memory-related, would it be possible to get hold of a small piece of code that demonstrates the issue? / comments
I haven't seen this when trying out the duck typing library myself. Generated code shouldn't cause a problem with the profiler.
It's possible that the profiler doesn't have enough memory to use in ...
Unfortunately, I'm not sure what can cause this at the moment. We just use the ServiceController class to stop and start the services, and something about your system's configuration is presumably interfering with it somehow. The timeout we apply to starting services is 5 minutes: does anything happen if you leave the profiler for that long, or does it continue to hang?
If you're on Vista, are you running ANTS as administrator? Running with reduced privileges will cause ANTS to be unable to start a service: however, when I try this I do get an error message reporting the problem. / comments
Unfortunately, I'm not sure what can cause this at the moment. We just use the ServiceController class to stop and start the services, and something about your system's configuration is presumably ...
Hi again,
Except for the service not starting, it sounds like everything is set up as it should be. I do have another couple of questions, though:
Can you profile another service? It doesn't matter if it's .NET or not, or a system service - the ANTS profiler service itself should do - does the profiler start it successfully? No performance counters will show until the service starts running .NET code, but ANTS should be able to start (or restart) any service.
Does your service have a display name that differs from the service name? This is something that is set in the service installer object. / comments
Hi again,
Except for the service not starting, it sounds like everything is set up as it should be. I do have another couple of questions, though:
Can you profile another service? It doesn't matter...
Hmm, that sounds like it might be something new, then. ANTS should create a log file in the results directory: do there appear to be any errors reported in there?
Is the service already running when you try to start profiling? If so, you could try stopping it in the services manager to see if that fixes the problem.
Does the service appear to be running in task manager while ANTS is hung? It's possible it has launched but hasn't signalled that it has finished starting. ANTS will wait quite a long time for the service to finish starting and may appear to be hung during this time. There is an issue in RC0 that could cause some unexpected exceptions, which could in turn be affecting your service startup in some way (this will be fixed in the final release).
Can you monitor any performance counters for the service when it's running normally using perfmon? Some strange behaviour is possible if the registry entries for the performance counters has become corrupted.
Can you profile standard desktop applications without an issue? / comments
Hmm, that sounds like it might be something new, then. ANTS should create a log file in the results directory: do there appear to be any errors reported in there?
Is the service already running whe...
This problem is going to be a knowledge base article for 4.0, though we hope to improve the error reporting to make this problem easier to diagnose in future releases.
The problem is due to the service not being able to write results out to the ANTS results directory - for example because it is running as LocalService - which causes it to fail on startup. There are a few things you can do to rectify this problem:
The best solution to this problem is to ensure that the directory that ANTS is using can be written to by the service you are profiling. By default this is C:\Documents and settings\<user>\Local Settings\Application Data\Red Gate\ANTS Performance Profiler 4 on XP. Setting the security so that Everyone has Full Control will ensure that anything can be profiled, though you may prefer to just add the service user. If you want to use a different directory, you can change it by setting the RGTEMP environment variable to whichever directory you want ANTS to use.
An alternative is to change the user that the service is configured to run as: LocalSystem services will typically have no problems, as will ones configured to run as your own user account. / comments
This problem is going to be a knowledge base article for 4.0, though we hope to improve the error reporting to make this problem easier to diagnose in future releases.
The problem is due to the ser...
An installer doesn't have to have a UI, so it would be possible to provide a 'quick install' version that puts everything in the default locations. It would also be possible to make a version with the usual prompts, but which could be disabled by using an msiexec command. / comments
An installer doesn't have to have a UI, so it would be possible to provide a 'quick install' version that puts everything in the default locations. It would also be possible to make a version with ...
ANTS puts logging data into the Local Settings\Application Data\Red Gate\ANTS Performance Profiler 4 directory. I'm not sure if this will contain any helpful information in your case, though.
The system log may contain information written by the w3wp process giving more information on why it failed. Something that does occur to me now is that the process being profiled does require a location to which it can write data. Normally we use the same directory as above, but IIS typically can't write there so we use the local settings directory that belongs to whichever user w3wp is launched as. On my system, this is at C:\Documents And Settings\A\Local Settings. If the process can't write there it won't be able to start profiling and will fail to start properly. With the default security settings this isn't a problem, but it can be if they've been changed.
As to your other question: it is possible to change the format ANTS displays the times in - you can find the options in the view menu. / comments
ANTS puts logging data into the Local Settings\Application Data\Red Gate\ANTS Performance Profiler 4 directory. I'm not sure if this will contain any helpful information in your case, though.
The s...
If the ANTS service is enabled, it will start as whichever user the ANTS service is running as; if not it will try to start it using the account it is running under. The worker process changes its credentials as set in the IIS security settings. If you're an administrator and not on Vista this will produce nearly identical behaviour: on Vista if the service isn't installed the worker process probably won't start.
For most cases, you can change where the profiler writes its data to by setting the RGTEMP environment variable to whichever directory you want to use; as the default behaviour doesn't work on IIS we use a different directory. We could change this behaviour, but you would then need to set up the security settings for the RGTEMP directory appropriately before you could profile IIS tasks.
The application log error message could explain why profiling isn't starting, though I'm at a bit of a loss to work out why this is happening: both the COR_PROFILER and the profiler flag variable are set in the same place in our code, so it's odd that one would get passed through and not the other. I'll pass this on to our testers to see if they can find a way of reproducing this. / comments
If the ANTS service is enabled, it will start as whichever user the ANTS service is running as; if not it will try to start it using the account it is running under. The worker process changes its ...