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

acl.prof.create_stamp

Creates a msproftx event stamp for an instantaneous event.

acl.prof.set_stamp_trace_message

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

acl.prof.mark

Marks an instantaneous event by msproftx.

acl.prof.push

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

acl.prof.pop

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

acl.prof.range_start

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

acl.prof.range_stop

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

acl.prof.destroy_stamp

Destroys a msproftx event stamp.

API Call Examples

The following is the sample code of the msproftx Profiling API:

msproftx APIs are called within the main function.