Using Raw Stack Capture with DevPartner Error Detection

Using Raw Stack Capture with DevPartner Error Detection

Problem:

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.

Resolution:

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.

 

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2016-05-13 18:32
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.