211
• Redundant cache flushes and memory fences
• Out-of-order persistent memory stores
• Incorrect undo logging for the PMDK
Persistence Inspector is included as part of Intel Inspector, an easy-to-use
memory and threading error debugger for C, C++, and Fortran that works with both
Windows and Linux operating systems. It has an intuitive graphical and commandline interfaces, and it can be integrated with Microsoft Visual Studio. Intel Inspector
is available as part of Intel Parallel Studio XE (https://software.intel.com/en-us/
parallel-studio-xe) and Intel System Studio (https://software.intel.com/en-us/
system-studio).
This section describes how the Intel Inspector tool works with the same out-ofbounds and memory leak examples from Listings 12-1 and 12-3.
Stack Overflow Example
The Listing 12-5 example demonstrates how to use the command-line interface to
perform the analysis and collect the data and then switches to the GUI to examine
the results in detail. To collect the data, we use the inspxe-cl utility with the –c=mi2
collection option for detecting memory problems.
Listing 12-5. Running Intel Inspector with code Listing 12-1
$ inspxe-cl -c=mi2 -- ./stackoverflow
1 new problem(s) found
1 Invalid memory access problem(s) detected
Intel Inspector creates a new directory with the data and analysis results, and prints
a summary of findings to the terminal. For the stackoverflow app, it detected one invalid
memory access.
After launching the GUI using inspxe-gui, we open the results collection through
the File ➤ Open ➤ Result menu and navigate to the directory created by inspxe-cli. The
directory will be named r000mi2 if it is the first run. Within the directory is a file named
r000mi2.inspxe. Once opened and processed, the GUI presents the data shown in
Figure 12-1.
Chapter 12 Debugging persistent MeMory appliCations
Précédent

- 235/457

Suivant