Intel® Inspector User Guide for Windows* OS

ID 767798
Date 7/13/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Visible to Intel only — GUID: GUID-8532C957-7F39-4201-B500-6E4B6517D66A

Document Table of Contents

Pane: Analysis Type-Threading Errors

Pane position in window

Before Analysis

(One way) To access this Intel Inspector pane:

  • From the Visual Studio* menu, choose Tools> Intel Inspectorversion> New Analysis... . Then choose Threading Error Analysis from the Analysis Type drop-down list.

    NOTE:
    In Visual Studio* 2022, Intel Inspector provides lightweight integration. You can configure and compile your application and open the standalone Intel Inspector interface from the Visual Studio for further analysis. All your settings will be inherited by the standalone Intel Inspector project.
  • From the Standalone Intel Inspector GUI menu, choose File > New > Analysis.... Then choose Threading Error Analysis from the Analysis Type drop-down list.

Use this pane on the Analysis Type window to:

  • Choose and, if necessary, fine-tune a preset threading error analysis type.

  • Configure a threading error analysis to investigate problems in an interactive debugging session.

TIP:

If the combination of analysis type settings in the preset threading error analysis types does not meet your needs at all, try creating a custom threading error analysis type.

During Analysis

To access this pane: Click the Analysis Type button on the Navigation toolbar.

Use this to review the analysis type settings for this analysis run.

After Analysis Is Complete

To access this pane: Click the Analysis Type button on the Navigation toolbar.

Use this pane to:

  • Review the analysis type settings for this analysis run.

  • Re-inspect - run another analysis using the same analysis type settings.

Use This

To Do This

Analysis Type drop-down list

Switch to another category of analysis types.

Configuration slider

Choose a preset analysis type (drag slider).

Analysis Time Overhead gauge

Analysis Time gauge

Quickly estimate the time it may take to collect a result using various preset analysis types. Time is expressed in relation to normal application execution time.

For example, 2x - 20x is 2 to 20 times longer than normal application execution time. If normal application execution time is 5 seconds, estimated collection time is 10 to 100 seconds.

Memory Overhead gauge

Memory Overhead gauge

The Memory Overhead gauge helps you quickly estimate the memory the Intel Inspector may consume to detect errors using this preset analysis type. Memory is expressed in blue-filled bars.

NOTE:

The gauge does not show memory used by the running application during analysis.

Copy button

Create a new custom analysis type based on the currently selected analysis type.

Configurable Threading Error Analysis Type Settings

The following list shows the configurable settings (in alphabetical order) for preset threading analysis types. Configurable means you can change the setting without creating a custom analysis type.

  • Remove duplicates checkbox (configurable for the Locate Deadlocks and Data Races analysis type only)

  • Scope drop-down list (configurable for the Locate Deadlocks and Data Races analysis type only)
  • Stack frame depth drop-down list

  • Terminate on deadlock checkbox

  • Use maximum resources checkbox (configurable for the Locate Deadlocks and Data Races analysis type only)

Threading Error Analysis Type Settings

Use the Details region to review current analysis type settings. The following table describes the purpose, usefulness, and cost (low, medium, high, or proportional in terms of time and resources) for each threading error analysis type configuration setting. (The settings are listed in alphabetical order.)

Setting

Purpose, Usefulness, and Cost

Cross-thread stack access detection

Use to set the alert mechanism for when a thread accesses stack memory of another thread.

The alert mechanism helps you decide if this is an issue that requires handling.

All options are low cost if Detect data races is selected.

Recommendation:

  • Use Hide problems/Hide warnings if using an OpenMP* or oneAPI Threading Building Blocks (oneTBB) programming model; or if cross-thread stack accesses are anticipated. Also select Detect races on stack.

  • Use Hide problems/Show warnings if cross-thread stack accesses are not anticipated. Also deselect Detect data races on stack.

  • Use Show problems/Hide warnings if cross-thread stack accesses are not anticipated but a previous analysis indicated they exist and you are not using an OpenMP* or oneAPI Threading Building Blocks (oneTBB) programming model. Also deselect Detect data races on stack.

Detect data races

Select to detect problems where multiple threads access the same memory location without proper synchronization and at least one access is a write.

Selecting is useful when you suspect data races that are not yet evident.

High cost.

Recommendation: Select. Consider also deselecting Use maximum resources to reduce cost.

Detect data races on stack (previously called Detect data races on stack accesses)

Available only if Detect data races is selected.

Select to detect data races for variables allocated on the stack.

Selecting is useful when threads in an application share variables from the stack and you suspect data races on the variables.

High cost.

Recommendation: Deselect. If you select, consider also deselecting Use maximum resources to reduce cost.

Detect deadlocks

Select to detect problems where two or more threads are waiting for the other to release resources, but none of the threads releases the resources. Thus no thread can proceed.

Selecting is useful when you want to troubleshoot the location of a deadlock.

Low cost.

Detect lock hierarchy violations

Select to detect problems where the acquisition hierarchy order of multiple synchronization objects in one thread differs from the acquisition hierarchy order in another thread, and could cause a deadlock under certain conditions.

Selecting is useful when an application has complicated synchronization and it is hard to verify correctness.

Low cost unless an application has a significant number of locks.