Introduction
Memory error analysis in Intel® Inspector can analyze most native binaries. However, some settings make analysis easier. In this article, "Intel Inspector" refers to the memory error analysis feature in particular.
Switch | Effect |
---|---|
Linux*: Windows*: |
Highly Recommended. Intel Inspector uses the symbols to associate addresses to source lines. Additionally using this setting is one of the ways in which memory error analysis filters out false positives. |
Linux*: Windows*: |
Memory Error Analysis Level 1 (Memory Leak Detection) requires information in the executable and all shared libs in your application to properly walk the call stack. This option is for frame pointers. |
Linux*: Windows*: |
Memory Error Analysis Level 1 (Memory Leak Detection) requires information in the executable and all shared libs in your application to properly walk the call stack. These options are for exception handling information. |
Switch | Effect |
---|---|
Linux*: Windows*: |
Recommended for Initial analysis. Allows Intel Inspector to more easily associate errors to the correct source line. Intel Inspector can also analyze optimized binaries, but it is difficult to pinpoint the source code location causing a problem in optimized assembly that does not have specific source lines. Note: While it is easier to do analysis of binaries built with -O0, it is also important to check for memory errors in your "released" (not -O0) version of your binaries. |
Switch | Effect |
---|---|
Linux*: Windows*: |
Not Recommended. Options on the compiler which add functionality similar to Intel Inspector XE can cause Intel Inspector to have false positives and false negatives. -fmudflap switch is known to cause false positives and false negatives with Intel Inspector XE. Switches such as this may impact performance without adding additional functionality. These switches may be useful outside Intel Inspector - and may potentially catch additional issues that Intel Inspector does not find. -fstack-security-check which add functionality similar to Intel Inspector is not known to cause false positives or false negatives with Intel Inspector. |
Linux*: Windows*: |
Do not use. Binaries which use instructions not supported by Intel Processors may cause unknown behaviors in Intel Inspector. |
Linux*: Linux*: |
Not Recommended. Intel Inspector works best with -debug full (the default). Other options including parallel, extended, emit-column, expr-source-pos, inline-debug-info, semantic-stepping, & variable-locations are not supported by Intel Inspector. |
Switch | Effect |
---|---|
Linux*: |
These setting directs the compiler to link in various libraries statically or dynamically. These switches impact Intel® Amplifier XE and threading error analysis for Intel Inspector XE. Memory error analysis in Intel Inspector XE works with statically linked libraries. |
Linux*: Windows*: |
Setting TBB_USE_THREADING_TOOLS causes Intel Threading Building Blocks (TBB) to be instrumented. This switch impacts Intel® Amplifier XE and threading error analysis for Intel® Inspector XE. Setting _DEBUG or TBB_USE_DEBUG will in turn set TBB_USE_THREADING_TOOLS |
Linux*: Windows*: |
This setting allows binaries to be instrumented and is not required for Intel Inspector XE. |
Notes
[1] Using Debug versions of the Microsoft C Runtime Libraries (/MDd and /MTd) enables the Microsoft* debug heap manager. see: Using the Microsoft* debug heap manager with memory error analysis of Intel® Parallel Inspector.
Note: There are other options which may add frame pointer or Exception handling to your binary as a side effect, Examples: -fexceptions (which is the default for C++).or -O0 . To make sure the executable (and shared libs) have this information, use the objdump -h <binary> command. You should see .eh_frame_hdr section there.
More Information
This article addressed the most obvious switches that developers would have concerns over. Most switches will work with Intel® Inspector - but not every switch combination is tested. If you have information regarding other switches, please add a comment to this article. If you have question regarding a particular switch please submit an issue to the Intel Inspector Forum.