Custom Profiling of the Host Application - 2024.1 English

Vitis Unified Software Platform Documentation: Application Acceleration Development (UG1393)

Document ID
Release Date
2024.1 English

All XRT related actions from the host application are automatically tracked for profiling, through either theOpenCL API calls, or the XRT API calls. However, you can also profile the host application beyond the XRT related events, capturing event data based on user-specified actions or events.

This feature provides two types of custom profiling:
User range
Profiles the specified start/end times across a range of code. This captures the span of time within which an action occurs in the host application.
User events
Marks an event in the timeline. The user event is added to the timeline waveform at whatever point in time it occurs.

The user_range and user_event data can be captured to the Profile Summary and Timeline Trace reports for display in Vitis analyzer. As seen in the figure below, the Profile Summary shows the number of occurrences of a given event and the range. The User Ranges table also reports the Min/Max/Avg/Total duration of the user-defined ranges in the host code. In the Timeline Trace report user_range elements in the host code are displayed in a separate row, and user_event markers are added at specific points on the timeline.

Figure 1. Profile Summary – User Range

Using custom profiling requires a few changes in your host application source code and build process. You must make use of C or C++ API in your code, as described below, and you must include the xrt_coreutil library when linking your host application.