Intel® Inspector XE has always provided suppression functionality, but with the introduction of the Inspector XE 2013 product, there are more powerful ways to control how your suppressions are matched to found issues and how your suppressions are stored and maintained.
There are a couple of ways to reduce the scope of the diagnostics presented by Inspector XE. If this is a diagnostic that you are interested in looking at later, but not now, we recommend that you use filters, or setting state and using filters, to remove the uninteresting issues from your result. But in the event of issues that you want to not see again, suppression is the correct answer. Information about using state and filters can be found in our help documents or other articles.
Building a new suppression
When you have a set of results open you may wish to suppress some of them. To do this, click on one of the errors you want to suppress to bring up the appropriate source locations in the lower pane. Then you can right click on any of those locations to bring up the following context menu:
Use the Suppress option to reach the suppression dialog:
In section 1, there are three options for types of suppressions to build:
Best Stack Frame – If you have used suppressions previously, this is the version that we have always had. If you have this, the default selection, marked, Inspector tries to find the lowest level stack frame that is actually in user code space and uses that to match versus the suppression rule. This is probably the best mode to use in the case of suppressing something actually in your code.
Top Stack Frame – This mode will try to match the suppression your suppression rule with the top stack location (the deepest into the code) in the error. This is probably the best mode to use if you are trying to suppress something that is in a system library.
Any Stack Frame – This mode finds a match whenever any frame in the stack matches the suppression rule. This is probably the right mode to use if the problem is in a 3rd party library and not in the top location.
As a side note, suppression performance is better with the Best Stack Frame or Top Stack Frame option. Although it would be simpler to use Any Stack Frame, it is not your best default. You cannot set type for individual code locations, you must set it for the entire suppression rule.
In section 2, the code locations for this issue have been prepopulated into a grid based on the code location and the type of suppression selected in section 1.
If you can define your suppression based on only one location instead of all of them, this will improve your suppression performance. Indicate whether you wish to use a code location using the check box at the left of each location line.
If you can make your suppression more general, this will improve your suppression performance, and allow you to suppress more than just the one issue. There are check boxes below that allow you to change to select, for example, a suppression that works regardless of what file the issue is in (Any Source). The information in the grid will be updated based on what boxes have been checked.
In section 3, there is information about the stack frame. If you are in “Best Stack Frame” or “Top Stack Frame” mode, this indicates information about the relevant frame, and is not interactive. If you are in “Any Stack Frame” mode, this is a drop down menu that will allow you to select any frame in the current stack to use as the initial criteria of your suppression rule.
Once you have set the suppression rule as desired, Create the rule and return to the summary pane.
Examining the suppressed issues
After you have created the suppression, you will see one or more of the problems in the summary pane will be marked with a strikethrough. Pay attention to what you see here. Anything that is marked as strikethrough on this view will be altered, and probably suppressed completely, should you rerun with the new suppression active. If you wish to not use the suppression, right click on your code locations and use Do Not Suppress to get to the Delete Suppressions dialog:
Check the box next to the suppression you wish to delete, and return to the create suppression dialog to try again.
Using suppressions on next run
To activate or inactivate a set of suppressions for your next run, go to Project->Project Properties. This will bring up the Project Properties Dialog, click on the Suppression tab to bring up the following dialog box:
Use this dialog to set which suppression files or folders of files will be active in this project. Once set here, these remain set until you return to this property page and reset them.
With the addition of the new Top Stack Frame and Any Stack Frame options for suppression, the capability of the Intel Inspector XE 2013 suppressions has be increased.
These suppressions can be a very powerful and specific tool for narrowing in on exactly the issues that are in your code and of relevance to you. Like any powerful tool, they require careful usage.