AQLprofile APIs#
2025-08-21
3 min read time
Learn about the typical APIs used in AQLprofile.
The APIs in aqlprofile_v2.h
are designed for use with ROCprofiler-SDK, and are actively maintained and recommended for all new development.
Note
The APIs in hsa_ven_amd_aqlprofile.h
are used by legacy tools such as rocprof
and rocprofv2
. You should use the new aqlprofile_v2.h
APIs instead.
From header aql_profile_v2.h
#
API Name |
Purpose |
---|---|
|
Registers an agent for profiling using basic agent info. |
|
Registers an agent for profiling using extended agent info and versioning. |
|
Retrieves information about PMC profiles (for example, buffer sizes, counter data). |
|
Checks if a given PMC event is valid for the specified agent. |
|
Creates AQL packets (start, stop, read) for PMC profiling and returns a handle. |
|
Deletes PMC profiling packets and releases associated resources. |
|
Iterates over PMC profiling results using a callback. |
|
Creates AQL packets (start, stop) for Advanced Thread Trace (SQTT) and returns a handle. |
|
Deletes ATT profiling packets and releases associated resources. |
|
Iterates over thread trace (SQTT) results using a callback. |
|
Iterates over all possible event coordinate IDs and names using a callback. |
|
Iterates over all event coordinates for a given agent and event using a callback. |
|
Creates a marker packet for code object events in thread trace workflows. |
Callback Typedefs#
Callback Typedef Name |
Purpose |
---|---|
|
Callback for allocating memory buffers for profiles (PMC/ATT). |
|
Callback for deallocating memory buffers allocated for profiles. |
|
Callback for copying memory (used internally by the profiler). |
|
Used with |
|
Used with |
|
Used with |
|
Used with |
From header hsa_ven_amd_aqlprofile.h
(Legacy)#
API Name |
Purpose |
---|---|
|
Checks if a given event (counter) is valid for the specified GPU agent. |
|
Populates an AQL packet with commands to start profiling (PMC or SQTT). |
|
Populates an AQL packet with commands to stop profiling. |
|
Populates an AQL packet with commands to read profiling results from the GPU. |
|
Converts an AQL packet to a PM4 packet blob (for legacy devices). |
|
Inserts a marker (correlation ID) into the ATT (thread trace) buffer. |
|
Retrieves various profile information, such as buffer sizes or collected data. |
|
Iterates over the profiling output data (PMC results or SQTT trace) using a callback. |
|
Returns a human-readable error string for the last error. |
|
Iterates over all possible event IDs and names for the agent. |
|
Iterates over all event coordinates for a given agent and event. |
Callback Typedefs#
Callback Typedef Name |
Purpose |
---|---|
|
Used with |
|
Used with |
|
Used with |