Detecting Thread Data Sharing Events

Multiple threads accessing the same data element can cause intermittent data corruption issues. With the Intel® Debugger, you can detect and analyze these thread data sharing events as part of a normal debugging session. The detected events are displayed in the Thread Data Sharing Events window.

To detect thread data sharing events:

  1. Select Parallel > Enable/Disable Detection.
  2. Select Parallel > Thread Data Sharing Events. The Thread Data Sharing Events window opens.
  3. Select Run > Run or Rerun.
  4. Alternatively, enter the following sequence of commands:
    1. (idb) idb sharing on
      This command enables detection of data sharing events.
    2. (idb) idb sharing stop on
      This command stops the debuggee whenever a data sharing event occurs. This behavior is on by default, if you haven’t specified idb sharing stop off, then you can skip this step.
    3. (idb) run
    4. (idb) idb sharing event expand

      This command displays detailed information for data sharing detection events.

The debugger executes your instrumented application and stops it when a data sharing event occurs. All thread data sharing events that occur during program execution appear in the Thread Data Sharing Events window or when you enter idb sharing event expand.

Note iconNote

If you do not want the application to stop at a data sharing event, select Parallel > Stop on Event to toggle the break. Alternatively, enter idb sharing stop off.

See Also


Submit feedback on this help topic

Copyright © 2001-2011, Intel Corporation. All rights reserved.