APIs for Collection Control
Intel Inspector
provides a set of collection control APIs to help you specify which parts of your application should be included in, or excluded from, analysis.
To support independence of implementation between library implementers and library users, the collection control APIs allow nesting by pushing and popping state information.
There are two kinds of collection control APIs:
- Time-oriented APIs to control which time periods of thread execution to analyze or not analyze
- Class-oriented APIs to control which data objects to analyze or not analyze
Using Time-oriented Collection Control APIs in Your Code
Use This in C/C++ Code
| Use This in Fortran Code
| To Do This
|
---|---|---|
|
| Tell the
Intel Inspector to stop analyzing for errors on the current thread.
C/C++ etype
Fortran mask
|
|
| Tell the
Intel Inspector to undo the action corresponding to the most recent matching nested
push call.
Push calls nest and are additive, so the
Intel Inspector does not resume analyzing for:
|
For errors that might involve two threads, the state the other thread was in at the time the memory operation happened is more important than the current thread state. For example:
- Thread A writes to variable X, then makes apushcall.
- Thread B reads variable X.
Conversely:
- Thread A suppresses, writes to variable Y, then unsuppresses.
- Thread B reads variable Y.
Even though both threads are currently unsuppressed, the error is not reported because thread A was suppressed at the time the conflicting accesses occurred.
Using Object-oriented Collection Control APIs in Your Code
Use This in C/C++ Code
| Use This in Fortran Code
| To Do This
|
---|---|---|
|
| C/C++ Tell the
Intel Inspector to mark the memory range defined by
address and
size with the flags
mode and
etype .
mode is
__itt_suppress_range or
__itt_unsuppress_range .
etype is:
addr is the address of the first byte to suppress.
size is the number of bytes to suppress.
Fortran Tell the
Intel Inspector to mark the memory range defined by
addr and
size with the flags
action and
mask .
action is
itt_suppress_range or
itt_unsuppress_range .
mask is:
addr is the address of the first byte to suppress.
size is the number of bytes to suppress.
|
|
| C/C++ Tell the
Intel Inspector to clear the previously marked range defined by
address and
size with the flags
mode and
etype .
mode is
__itt_suppress_range or
__itt_unsuppress_range .
etype is:
addr is the address of the first byte to not suppress.
size is the number of bytes to not suppress.
Fortran Tell the
Intel Inspector to clear the previously marked range defined by
addr and
size with the flags
action and
mask .
action is
itt_suppress_range or
itt_unsuppress_range .
mask is:
addr is the address of the first byte to not suppress.
size is the number of bytes to not suppress.
|
When the
Intel Inspector
detects an error, it checks the set of marked ranges and, using the smallest enclosing range, filters out the error if the
mode/action
is
suppress_range
and the
etype/mask
matches the detected error.
The largest supported range is 2 GB.
The default
mode/action
for all of memory is
unsuppress_range
. You can change the default by creating a range with address NULL and size 0.
You can nest ranges only if the new range is a subset of existing ranges.
Two calls to
mark_range
that specify the same range and intersecting
etype/mask
may not specify both
suppress_range
and
unsuppress_range
as the
mode/action
.
Usage Example: Time-oriented Collection Control
C/C++ Example
| Fortran Example
|
---|---|
|
|
Usage Example: Object-oriented Collection Control
C/C++ Example
| Fortran Example
|
---|---|
|
|