Add rocprofiler_query_counter_info function (#452)
* Add rocprofiler_query_counter_info function
Replaces rocprofiler_query_counter_name. Allows for
querying other types of info from counters (such as
description) and gives us some flexibility to add
return data in the near future (if we have to).
* source formatting (clang-format v11) (#453)
Co-authored-by: bwelton <bwelton@users.noreply.github.com>
* Updated version fetching
* source formatting (clang-format v11) (#509)
Co-authored-by: bwelton <bwelton@users.noreply.github.com>
* Merged
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: bwelton <bwelton@users.noreply.github.com>
[ROCm/rocprofiler-sdk commit: 7adffd5b22]
Este cometimento está contido em:
cometido por
GitHub
ascendente
cb6e12ab3a
cometimento
2d9779ad96
@@ -97,19 +97,21 @@ rocprofiler_iterate_counter_dimensions(rocprofiler_counter_id_t id,
|
||||
void* user_data);
|
||||
|
||||
/**
|
||||
* @brief Query Counter name. Name is a pointer controlled by rocprofiler and
|
||||
* should not be free'd or modified.
|
||||
* @brief Query Counter info such as name or description.
|
||||
*
|
||||
* @param [in] counter_id counter for which to get its name.
|
||||
* @param [out] name returns a pointer to the name of the counter
|
||||
* @param [out] size returns the size of the name returned
|
||||
* @param [in] counter_id counter to get info for
|
||||
* @param [in] version Version of struct in info, see @ref rocprofiler_counter_info_version_id_t for
|
||||
* available types
|
||||
* @param [out] info rocprofiler_counter_info_{version}_t struct to write info to.
|
||||
* @return ::rocprofiler_status_t
|
||||
* @retval ROCPROFILER_STATUS_SUCCESS if counter found
|
||||
* @retval ROCPROFILER_STATUS_ERROR_COUNTER_NOT_FOUND if counter not found
|
||||
* @retval ROCPROFILER_STATUS_ERROR_INCOMPATIBLE_ABI Version is not supported
|
||||
*/
|
||||
rocprofiler_status_t ROCPROFILER_API
|
||||
rocprofiler_query_counter_name(rocprofiler_counter_id_t counter_id, const char** name, size_t* size)
|
||||
ROCPROFILER_NONNULL(2, 3);
|
||||
rocprofiler_query_counter_info(rocprofiler_counter_id_t counter_id,
|
||||
rocprofiler_counter_info_version_id_t version,
|
||||
void* info) ROCPROFILER_NONNULL(3);
|
||||
|
||||
/**
|
||||
* @brief This call returns the number of instances specific counter contains.
|
||||
|
||||
@@ -260,6 +260,26 @@ typedef enum
|
||||
ROCPROFILER_TABLE_LAST = ROCPROFILER_MARKER_NAME_TABLE,
|
||||
} rocprofiler_intercept_table_t;
|
||||
|
||||
/**
|
||||
* @brief Enumeration for specifying the data type contained within the union.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
ROCPROFILER_UNION_TYPE_NONE = 0, ///< No union type
|
||||
ROCPROFILER_UNION_TYPE_STRING, ///< String Type set
|
||||
ROCPROFILER_UNION_TYPE_INT, ///< Integer Type Set
|
||||
ROCPROFILER_UNION_TYPE_LAST,
|
||||
} rocprofiler_union_type_t;
|
||||
|
||||
/**
|
||||
* @brief Enumeration for specifying the counter info struct version you want.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
ROCPROFILER_COUNTER_INFO_VERSION_NONE,
|
||||
ROCPROFILER_COUNTER_INFO_VERSION_0, ///< @see rocprofiler_counter_info_v0_t
|
||||
ROCPROFILER_COUNTER_INFO_VERSION_LAST,
|
||||
} rocprofiler_counter_info_version_id_t;
|
||||
//--------------------------------------------------------------------------------------//
|
||||
//
|
||||
// ALIASES
|
||||
@@ -500,6 +520,18 @@ typedef struct
|
||||
rocprofiler_correlation_id_t corr_id;
|
||||
} rocprofiler_record_counter_t;
|
||||
|
||||
/**
|
||||
* @brief Counter info struct version 0
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
const char* name; ///< Name of the counter
|
||||
const char* description; ///< Description of the counter
|
||||
bool is_derived; ///< If this counter is a derrived counter
|
||||
const char* block; ///< Block of the counter (non-derrived only)
|
||||
const char* expression; ///< Counter expression (derrived counters only)
|
||||
} rocprofiler_counter_info_v0_t;
|
||||
|
||||
/**
|
||||
* @brief ROCProfiler SPM Record.
|
||||
*
|
||||
|
||||
Criar uma nova questão referindo esta
Bloquear um utilizador