Function Description
Overview
When you need to locate the performance bottleneck of your app or the upper-layer framework program, call the profiling pyACL extension APIs during the profiling process (between the acl.prof.start and acl.prof.stop calls). The extension APIs together achieve the msproftx function, which is used to record the time span of specific events during app running and write data to a profile data file. You can use the Profiling tool to parse the file and export the profile data.
For details about how to parse and export profile data, see sections "Parsing Profile Data" and "Exporting Profile Data" in Profiling Instructions.
API calling: acl.prof.create_stamp, acl.prof.set_stamp_trace_message, acl.prof.mark, acl.prof.push, acl.prof.pop, acl.prof.range_start, acl.prof.range_stop, and acl.prof.destroy_stamp are called between acl.prof.start and acl.prof.stop. These API calls obtain the events that occur at a specific time during app running and record the event time span.
In a process, these APIs can be called for multiple times as required.
API Constraints
- Requirements for API calls: msproftx function APIs must be called between acl.prof.start and acl.prof.stop. The following APIs are used in pairs: acl.prof.create_stamp/acl.prof.destroy_stamp, acl.prof.push/acl.prof.pop, and acl.prof.range_start/acl.prof.range_stop.
- API call sequence: acl.prof.start (specify Device 0 and Device 1) --> acl.prof.create_stamp --> acl.prof.set_stamp_trace_message --> acl.prof.mark --> (acl.prof.push --> acl.prof.pop) or (acl.prof.range_start --> acl.prof.range_stop) --> acl.prof.destroy_stamp --> acl.prof.stop (consistent with the aclprofConfig data of acl.prof.start).