Using msproftx APIs to Collect and Flush Profile Data

To collect the profile data of the user and upper-layer framework applications, instrument the code using msproftx APIs before enabling the tool.

API Overview

Table 1 APIs

API

Description

aclprofCreateStamp

Creates a msproftx event stamp for an instantaneous event.

aclprofSetStampTraceMessage

Sets the description in a msproftx event stamp, which is displayed in the parsed msprof_tx summary data of the Profiling tool.

aclprofMark

Marks an instantaneous event by msproftx.

aclprofMarkEx

aclprofMarkEx dotting API.

aclprofPush

Records the start time of the time span by msproftx when an event occurs. It is used with aclprofPop in pairs and can be used only in a single thread.

aclprofPop

Records the end time of the time span by msproftx when an event occurs. It is used with aclprofPush in pairs and can be used only in a single thread.

aclprofRangeStart

Records the start time of the time span by msproftx when an event occurs. It is used with aclprofRangeStop in pairs and can be used across threads.

aclprofRangeStop

Records the end time of the time span by msproftx when an event occurs. It is used with aclprofRangeStart in pairs and can be used across threads.

aclprofDestroyStamp

Destroys a msproftx event stamp.

If only the msproftx function is enabled, deviceIdList of the aclProfCreateConfig API must be left empty, and deviceNums must be set to 0.

For details about the APIs, see Runtime APIs.

API Call Examples

msproftx APIs are called within the main function.