Call Stack Reducer
The call stack reducer rates the importance of all functions in all call stacks, and keeps a count of the number of call stack frames that exist. If the number of frames exceeds a threshold (defined by the Max skippable call tree nodes setting), the call stacks reducer will skip functions that are deemed to be "least important". It will skip as many functions as necessary to make the number of call tree nodes less than the threshold.
The importance of a method or function in a call stack is based on several parameters. The parameters include:
Whether it is a private, public, or source method
Source methods are more important than other methods, public methods are more important than private methods.Whether it is a native function or a managed method
How close the function is to a source function or the function making the allocation
Functions that are close to a source function or the function making the allocation, are considered more important than functions "in the middle".How much memory will be saved if the function is skipped
The parameters are combined for each function, and the combined parameters will provide a "level of importance" for the function. The "level of importance" will then be used to decide what functions should be skipped when reducing the call stacks.
When a function is excluded from a call stack, it is replaced with an entry named [Skipped frame(s)]. If two or more adjacent functions are skipped, only one [Skipped frame(s)] entry will be added, which will cause the stack depth to be decreased.
There is a slight performance penalty when using the call stacks reducer, but the result is often a good compromise between reducing the memory used by call stacks and providing adequate call stack information.