Cache Heatmap
msProf records the L2 cache access of kernel functions in user programs and uses MindStudio Insight to display the cache heatmap. The heatmap displays the instruction information, allowing users to optimize the cache hit ratio and operator programs.
- To use MindStudio Insight, you need to install the MindStudio Insight software package separately. For details about the download link, see"Installation and Uninstallation".
- For details about how to import the visualize_data.bin file to MindStudio Insight, see Importing Profile Data.
- For details about the operations and fields on MindStudio Insight, see .
- If the -g compilation option is added, the generated binary file contains debugging information. You are advised to restrict the access permission of user programs with debugging information to ensure that only authorized personnel can access the binary file.
- If the functions provided by the llvm-symbolizer component are not used, do not include -g when compiling the program that is input to msProf. In this case, the msProf tool does not call the functions of the llvm-symbolizer component.
- The cache heatmap function is not applicable to
Atlas inference products . - The MC2 and LCCL operators do not support the generation of Cache Heatmap.
Figure 1 Cache heatmap
- Hit indicates the cacheline hit, and Miss indicates the cacheline miss, allowing you to analyze the L2 cache usage.
- On the Cache tab page, select a hit or miss event graph and click to enlarge the event graph. In the enlarged event graph, right-click the selected memory cell and choose Show Instructions In Source from the shortcut menu. The page is displayed, and the related instruction line is highlighted.
Figure 2 Operator code hot spot map corresponding to cacheline
To use the redirection from the cache heatmap to the operator code hot spot map, perform configuration in advance by referring to Configuration of msprof op.
Parent topic: msProf (Operator Tuning)