Memory Profiling

I am absolutely unable to memory profile my test application. Occasonally the Snapshot actually works and gets me some result, most of the times it just stays "Taking Snapshot" and never completes. When the application quits, ANTS reports that the application ended while sending data and that profiling will stop.

Another thing: is there any possibility to see in which LINE an object was allocated instead of only the method?

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 New member
    That's interesting. If the application is causing a 'low-memory' situation, then ANTS Profiler may not have enough memory available to complete the operation. I'm also trying to track down a possible bug where Profiler can't get the results when Garbage Collection tasks are taking too much processing time. So possibly using Perfmon to monitor the .Net CLR Memory->% time spent in GC performance counter for the instance of your own application may reveal something. If you can adjust your program so it is not doing so much GC, it may get Profiler working until we can find the base cause of this problem.

    I don't believe Profiler is capable of showing the line number where an object had been allocated, but at least you can click the object in the all objects panel and see the source code for the allocation method in the source code view and be able to work it out. Maybe we can enhance this in the future.
  • Definitely no low-memory situation, the application uses about 8mb at max during 20-30 seconds.
    Perfmon shows a peak of 7.6 for %time spent in GC.

    If it helps, I could send the app over for testing to you.

    I am probably too spoiled from C++ Profilers where the whole call stack of the allocation location is shown. In my case I see only that most of the objects are allocated in System.Collections...whatever...Resize(). thats absolutely not very helpful.
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    ANTS Profiler has a stack panel (View->Call Stack)

    If you could create a 'logs' folder in the ANTS Profiler 3 folder, then profile the application again, a log should be created in that folder. Much appreciated if you can send the log files!
  • I dont know which version you are using, but mine definitely does not have a call stack view. I am using 3.1.0.20.

    In the View menu I have
    Back
    Forward
    Summary
    All Methods
    Start Page
    Source Code
    Hierarchy
    Results

    Thats it. Not finding anywhere a Call Stack view.
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Those are the exact choices available in the menu when you do performance profiling. If you are looking at memory profiling results, you will see the call stack as the last option in the view menu.
  • How odd. That should be grayed out when unavailable but not removed. Thats irritating.
Sign In or Register to comment.