How can we help you today? How can we help you today?
Andrew H
I've been looking into this, and it appears to be an issue caused by a bug in the .NET profiling interface. Some of the int32 arrays being allocated by BuggyBits are not being reported by .NET as objects to the profiler, although the objects that reference them are (and are apparently still valid as objects and not candidates for garbage collection). I suspect there's a configuration element to this issue as well, which is why it does not show up on everyone's system. You can see this yourself by looking at the class list and comparing the count of System.Int32[] objects to News_aspx objects: there should be at least as many arrays as pages, but when this bug occurs there are typically around 100 'missing' arrays. I'm looking into ways to work around this; unfortunately, it's not easy to recover the missing results, which means that they will likely appear as free space. What I have found that works is disabling the server garbage collector as described here: http://support.microsoft.com/kb/911716 - I'm not sure if the bug is directly connected to this. There may still be circumstances where this can happen with workstation GC, and this is not an ideal fix as it changes the garbage collector behaviour. This bug can also manifest as a CouldNotMapFileException, with an IOException code of 0x8 - the same workaround should work. / comments
I've been looking into this, and it appears to be an issue caused by a bug in the .NET profiling interface. Some of the int32 arrays being allocated by BuggyBits are not being reported by .NET as o...
0 votes
The 'file has been modified' warning is shown if the time of modification of the file is different to what it was when profiling was carried out. This is usually a reliable indicator but can also be flagged up if the results are taken between two machines with their own copy of the same source code. The warning is flagged up because if the profiler isn't saving source code along with the results then any modifications will make the line-level timings meaningless. Line-level timings not lining up with the source code can be caused by a couple of problems: the most common is that the application that was profiled was compiled from a different version of the source code. A less common cause can be that the C# compiler records different line positions from those used by our source control for some reason. Visual Studio usually warns about inconsistent line endings in situations where this can occur. We don't currently know about any situations which can cause this, though exotic unicode line endings or odd combinations of the ASCII \r and \n characters could potentially cause a conflict. The occasional inability to drill down through a function can happen for a few reasons: this facility is implemented by inspecting the source code and comparing it to the generated call stacks. If the line-level data isn't matching up to the source code for any reason, it can be impossible to determine which function calls correspond to which line of code. Interfaces, events, anonymous delegates, the yield operator and other C# features can result in functions being called at run-time that look very different to the way they are specified in the source code, which will make this feature fail to work. / comments
The 'file has been modified' warning is shown if the time of modification of the file is different to what it was when profiling was carried out. This is usually a reliable indicator but can also b...
0 votes
The profiler performs a single full garbage collection while taking a snapshot. It's invoked via a different .NET API but shouldn't have an effect that's any different from GC.Collect(). There are a few things that can cause .NET memory usage to appear not to change after a garbage collection: * The # bytes in all heaps counter is often not accurate as it's only updated after a garbage collection, and there are times when .NET allocates more memory without causing a GC (and rare times when it releases memory outside of a GC). The private bytes counter is updated in real time. * Fragmentation of the large object heap can prevent .NET from releasing memory back to the system. You can see free space in .NET heaps in the memory profiler, as well as the largest free contiguous block: if there is a lot of free space but the largest contiguous block is small then fragmentation is occurring. * Objects referenced by objects with finalizers require at least 2 garbage collection cycles to be removed from memory, and possibly more if these references themselves have finalizers. * .NET can maintain a pool of free memory for future object allocations if it thinks that there will be a lot of them (this allows it to postpone future garbage collections). It might decide to release this back to the system if there is another GC and not much of the free memory is used. This is often beneficial for the performance of server style applications. / comments
The profiler performs a single full garbage collection while taking a snapshot. It's invoked via a different .NET API but shouldn't have an effect that's any different from GC.Collect(). There are ...
0 votes
We do only show the shortest paths in the object reference graph at the moment: we're planning to look at new ways of exploring the graph in future versions. However, the roots that we do show are only the strong roots for an object: weak roots (and hence weak references) are deliberately excluded from the graph, as there are usually too many of these in WinForms or WPF applications for the graph to make any sense. You can use the class reference graph to explore the full relationships between objects, and switch to the object list or graph when you find something interesting there. The filters can be useful for narrowing down cases where there are a lot of similar objects. For a UI library like WPF you typically find that everything eventually references everything else in some way - it's for this reason that we prefer to use the shortest path, as when there's a loop of references, the objects nearer to a root are typically nearer to the 'start' of the loop as seen from the point of view of the program. The object graph highlights any objects that make a loop in a blue box - any objects so highlighted have a path linking them in both directions - typically through parent/child fields but sometimes via more complicated paths. / comments
We do only show the shortest paths in the object reference graph at the moment: we're planning to look at new ways of exploring the graph in future versions. However, the roots that we do show are ...
0 votes