User Guide

  • 2020
  • 06/18/2020
  • Public Content
Contents

Memory Watch

Occurs when a task accesses a memory location marked by an
ANNOTATE_OBSERVE_USES
annotation. In this case, this
problem
provides informational feedback only and no action is required. This is useful for finding uses of specified memory locations while a task is executing.
One of the following has occurred:
Problem type: Memory watch
Problem type: Memory watch
Problem type: Memory watch
ID
Code Location
Description
1
Parallel site
If present, represents the location and associated call stack of the parallel site containing the Memory Watch problem.
2
Watch start
Represents the location and its associated call stack where an
ANNOTATE_OBSERVE_USES()
annotation marks a memory location.
3
Read
Represents the location and associated call stack where a task read the watched memory location.
4
Write
Represents the location and associated call stack where a task wrote the watched memory location.
5
Update
Represents the location and associated call stack where a task read and wrote the watched memory location.
void watch_memory() { ANNOTATE_OBSERVE_USES(&watch, sizeof(watch)); // Watch start ANNOTATE_SITE_BEGIN(watch_site); // Parallel site { ANNOTATE_TASK_BEGIN(watch_task1); { ANNOTATE_LOCK_ACQUIRE(&watch); watch++; /* watch memory */ // Read and/or Write ANNOTATE_LOCK_RELEASE(&watch); } ANNOTATE_TASK_END(); ANNOTATE_TASK_BEGIN(watch_task2); { ANNOTATE_LOCK_ACQUIRE(&watch); watch++; /* watch memory */ // Read and/or Write ANNOTATE_LOCK_RELEASE(&watch); } ANNOTATE_TASK_END(); } ANNOTATE_SITE_END(); ANNOTATE_CLEAR_USES(&watch); }
This example reports all places that use the memory location referenced by
watch
during the call to
watch_memory()
.
Possible Correction Strategies
To use
ANNOTATE_OBSERVE_USES
to help you correct an incidental sharing problem, do the following to mark places where you may be able replace uses of a shared memory location with uses of a non-shared memory location:
  1. Add an
    ANNOTATE_OBSERVE_USES
    annotation to the task.
  2. Find all uses of the shared memory location in the dynamic extent of the task.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804