This is a migrated thread and some comments may be shown as answers.

Enabling "Accurate Object Age" makes my app behave differently

2 Answers 28 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Rob
Top achievements
Rank 1
Rob asked on 23 Jul 2014, 09:39 AM
I want to investigate memory usage after my app reaches a certain checkpoint. In particular, I want to see any memory allocations made *after* this checkpoint that make it to Gen2. I'm trialling JustTrace, as the "Instances Diff" with "Accurate Object Age" seems ideal for this.

However, my app behaves differently when profiled with "Accurate Object Age" is enabled. My app diverts to an error handling branch and thus never reaches the checkpoint.
(My app performs various deterministic calculations, the only user interaction is a Console.ReadLine() where I want to take the snapshots. Thus there should be no variation in behaviour between runs)

If I run the app alone, or run it via the JustTrace memory profiler either with or without "Collect allocation call stacks" enabled, then it works exactly as expected. But the "Accurate Object Age" feature appears to break things.



2 Answers, 1 is accepted

Sort by
0
Rob
Top achievements
Rank 1
answered on 23 Jul 2014, 10:17 AM
Oops - this is my fault. On further investigation, the reason for the change in behaviour is an "Out of Memory" exception was thrown. It's not surprising that collecting ages increases the memory used. Will find a workaround and retry the feature
0
Tsvetomir
Telerik team
answered on 24 Jul 2014, 07:12 AM
Hello Rob,

I am glad that you found the cause of this unpleasant behavior.

Indeed, enabling "Accurate Object Age" option gives more detailed of view of object's lifespan, but significantly  increases the memory consumption and gives some performance drawback. I would suggest (if it is an option) to profile your application on more powerful PC with 64 bit OS.


Kind Regards,
Tsvetomir
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
General Discussions
Asked by
Rob
Top achievements
Rank 1
Answers by
Rob
Top achievements
Rank 1
Tsvetomir
Telerik team
Share this question
or