Collecting msproftx Data

To locate the performance bottleneck of your application or the upper-layer framework program, call the following two APIs during the data collection process (between the aclprofStart and aclprofStop calls). The extension APIs record the time span of specific events during application running and write data to a profile data file. You can use the msprof tool to parse the file and export and display the result.

Example of Command for Collecting the msproftx Data

Log in to the environment where the Ascend-CANN-Toolkit is located as the running user and run the profile data collection command after operations in Environment Setup are complete. The following is an example:

msprof --msproftx=on /home/projects/MyApp/out/main

The collection of msproftx data requires the passing of a user application.

Command-line Options

Table 1 Command-line options

Option

Description

Required/Optional

--msproftx

Switch that controls the msproftx user application and upper-layer framework to output profile data, either on or off (default).

Required

msproftx Data Description shows the profile data generated after options for collecting the msproftx data are configured.