As part of the function of identifying memory leaks, DevPartner Error Detection tracks memory allocations, focusing on those generated from user code. At the time of the allocation DevPartner gathers information about the stack that will used to identify where in code that allocation was initiated. Error Detection will walk through the stack data and retain the data needed for later retrieval and use when an error is reported.
For applications that generate a very large volume of allocations, such as those using Microsoft Standard Template Libraries and Boost libraries, the processing effort necessary to walk through the stack data and retain only the relevant data can cause a significant decrease in profiling performance.
When the application frees the memory, which is the usual use case, the stack information is deleted. In this case the processing of the stack data at the time of the allocation was unnecessary.
Raw Stack Capture can be used to defer the processing of the stack data until, an error is identified and an entry into the transcript is needed, or until a .dll is unloaded. If there is an error which requires a transcript entry, then Error Detection will walk through the stack data and identify the calling function at that time. When a .dll is unloaded Error Detection will perform this on all raw stack data captured. Retaining the raw stack data does improve performance but at the cost of additional memory required to retain the raw stack data.
To turn on this feature, under DevPartner Settings \ Data Collection, check the Allocation\ "Use raw stack capture" method box.
For application using Microsoft Standard Template Libraries and Boost libraries, it is preferable to exclude these from instrumentation and profiling using nmigore.