From b29d3f63e2f874e9b24b6c9578ce260fd9806707 Mon Sep 17 00:00:00 2001 From: Kent Russell Date: Wed, 8 Nov 2017 06:59:33 -0400 Subject: [PATCH] Revert "aqlprofile API: _start() sets buffers sizes with NULL ptr; block counters reg number / block name info" This reverts commit 3daa85fad8f5a7f420a6db2f47406ebc306649c3. Change-Id: Ie90b091df772bf9391494c773d63858aafbc1176 --- .../core/runtime/hsa_ext_interface.cpp | 2 +- .../hsa-runtime/inc/hsa_ven_amd_aqlprofile.h | 22 +++++-------------- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/runtime/hsa-runtime/core/runtime/hsa_ext_interface.cpp b/runtime/hsa-runtime/core/runtime/hsa_ext_interface.cpp index 2cafb5d143..ae3477850c 100644 --- a/runtime/hsa-runtime/core/runtime/hsa_ext_interface.cpp +++ b/runtime/hsa-runtime/core/runtime/hsa_ext_interface.cpp @@ -764,7 +764,7 @@ hsa_status_t hsa_ven_amd_aqlprofile_validate_event( } hsa_status_t hsa_ven_amd_aqlprofile_start( - hsa_ven_amd_aqlprofile_profile_t* profile, // [in/out] profile contex object + const hsa_ven_amd_aqlprofile_profile_t* profile, // [in] profile contex object hsa_ext_amd_aql_pm4_packet_t* aql_start_packet) // [out] profile start AQL packet { return core::Runtime::runtime_singleton_->extensions_.aqlprofile_api.hsa_ven_amd_aqlprofile_start_fn(profile, aql_start_packet); diff --git a/runtime/hsa-runtime/inc/hsa_ven_amd_aqlprofile.h b/runtime/hsa-runtime/inc/hsa_ven_amd_aqlprofile.h index 6fcd08f761..5aa66f2605 100644 --- a/runtime/hsa-runtime/inc/hsa_ven_amd_aqlprofile.h +++ b/runtime/hsa-runtime/inc/hsa_ven_amd_aqlprofile.h @@ -188,14 +188,11 @@ typedef struct { hsa_signal_t completion_signal; } hsa_ext_amd_aql_pm4_packet_t; -// Method to populate the provided AQL packet with profiling start commands. +// Method to populate the provided AQL packet with profiling start commands // Only 'pm4_command' fields of the packet are set and the application -// is responsible to set Vendor Specific header type a completion signal. -// PMC profile command_buffer and output_buffer size fields are set to actual -// values if the buffers ptr is NULL. -// SQTT profile command_buffer size field is set to actual value. +// is responsible to set Vendor Specific header type a completion signal hsa_status_t hsa_ven_amd_aqlprofile_start( - hsa_ven_amd_aqlprofile_profile_t* profile, // [in/out] profile contex object + const hsa_ven_amd_aqlprofile_profile_t* profile, // [in] profile contex object hsa_ext_amd_aql_pm4_packet_t* aql_start_packet); // [out] profile start AQL packet // Method to populate the provided AQL packet with profiling stop commands @@ -230,23 +227,14 @@ typedef struct { }; } hsa_ven_amd_aqlprofile_info_data_t; -// ID query -typedef struct { - const char* name; - uint32_t id; - uint32_t instances; -} hsa_ven_amd_aqlprofile_id_query_t; - // Profile attributes typedef enum { HSA_VEN_AMD_AQLPROFILE_INFO_COMMAND_BUFFER_SIZE = 0, // get_info returns uint32_t value HSA_VEN_AMD_AQLPROFILE_INFO_PMC_DATA_SIZE = 1, // get_info returns uint32_t value HSA_VEN_AMD_AQLPROFILE_INFO_PMC_DATA = 2, // get_info returns PMC uint64_t value // in info_data object - HSA_VEN_AMD_AQLPROFILE_INFO_SQTT_DATA = 3, // get_info returns SQTT buffer ptr/size + HSA_VEN_AMD_AQLPROFILE_INFO_SQTT_DATA = 3 // get_info returns SQTT buffer ptr/size // in info_data object - HSA_VEN_AMD_AQLPROFILE_INFO_BLOCK_COUNTERS = 4, // number of block counters - HSA_VEN_AMD_AQLPROFILE_INFO_BLOCK_ID = 5, // block id by name } hsa_ven_amd_aqlprofile_info_type_t; // Definition of output data iterator callback @@ -289,7 +277,7 @@ typedef struct hsa_ven_amd_aqlprofile_1_00_pfn_s { bool* result); hsa_status_t (*hsa_ven_amd_aqlprofile_start)( - hsa_ven_amd_aqlprofile_profile_t* profile, + const hsa_ven_amd_aqlprofile_profile_t* profile, hsa_ext_amd_aql_pm4_packet_t* aql_start_packet); hsa_status_t (*hsa_ven_amd_aqlprofile_stop)(