Agent, Counters, and AQL (#55)
* Migrate XML counter defs and reader from v1/v2
* Current Working Set
* Modified parser
* Evaluate AST Start
* Update lib/common/xml
- move definitions out of class declaration
* Update lib/rocprofiler/counters/parser
- update build of bison and flex build
- reproducible generation
- add ROCPROFILER_REGENERATE_COUNTERS_PARSER option
- fix namespacing
* Update lib/rocprofiler/counters/xml
- change location of XML files and install them
* Update lib/rocprofiler/counter/tests
- normalize the test names
- improve test failures (more clear about where failure is)
* Update lib/rocprofiler/counters
- fix namespace
- update to new XML metrics directory
* Update lib/rocprofiler/CMakeLists.txt
- link to object library
* Update lib/rocprofiler/hsa/types.hpp
- reorganize includes
* Add metric loading class/printers
* Agent Implementation
* Queue Implementation (#79)
* Queue Implementation
* API Implementation For Counters (part 1) (#80)
* API Implementation For Counters
* Bewelton/counter collection 3 (#84)
* Added counter sample
* More changes
* More changes
* Update samples/counter_collection
- mostly formatting
* Update include/rocprofiler/counters.h
- formatting
* Add lib.common/synchronized.hpp
- Synchronized struct
* Update lib/rocprofiler/counters/xml/basic_counters.xml
- whitespace
* Update scripts/patch-parser.cmake
- tweaks for consistency
* Update lib/rocprofiler/counters/parser/tests/parser_tests.cpp
- formatting
* Update lib/rocprofiler/counters/parser
- improve consistency in rocprofiler-expr-parser-patch
- update parser.{h,cpp} and scanner.cpp
- formatting + regenerated
* Update lib/rocprofiler/aql
- formatting
- clang-tidy fixes
- guard against memory pool access errors
* Update lib/rocprofiler/aql/tests
- formatting
- update use of get_val
- normalize test names
* Update lib/rocprofiler/counters/tests
- formatting
- patch basic_counters and derived_counters
- normalize test names
* Update lib/rocprofiler/aql/tests
- set_tests_properties
* Update test labels
- fix minor issue with gtest labels
* Update lib/rocprofiler/counters
- formatting
- clang-tidy fixes
* Update lib/rocprofiler/hsa
- fix includes
- formatting
- clang-tidy fixes
- tweak to queue_controller_init interface
* Update lib/rocprofiler
- include fixes
- namespace fixes
- clang-tidy fixes
- formatting
* Update scripts/run-ci.py
- exclude counters/parser from code coverage (generated files)
* Update include/rocprofiler/counters.h
- fix doxygen comment
* Update lib/rocprofiler/aql/packet_construct.cpp
- guard against HSA_AMD_MEMORY_POOL_ACCESS_DISALLOWED_BY_DEFAULT and HSA_AMD_MEMORY_POOL_ACCESS_NEVER_ALLOWED
* Update lib/rocprofiler/counters/parser/raw_ast.hpp
- clang-tidy fixes
* Update lib/rocprofiler/counters/evaluate_ast.hpp
- clang-tidy fixes
* Update lib/rocprofiler/aql/tests
- disable packet_generation_single and packet_generation_multi tests
- the entire implementation rocprofiler::get_ext_table() is incorrect
* Minor fixes before cleanup
* More changes
* More fixes
* More fixes
* source formatting (clang-format v11) (#99)
Co-authored-by: bwelton <bwelton@users.noreply.github.com>
* Revert PTL submodule
* Update scripts/run-ci.py
- exclude counters/parser from code coverage (generated files)
* Migrating counters state to context
* Linting
* source formatting (clang-format v11) (#101)
Co-authored-by: bwelton <bwelton@users.noreply.github.com>
* revert run-ci
* Testing fixes
* More test changes
* Fix minor typo
* Small queue change
* Small queue change
* source formatting (clang-format v11) (#102)
Co-authored-by: bwelton <bwelton@users.noreply.github.com>
* source formatting (clang-format v11) (#105)
Co-authored-by: bwelton <bwelton@users.noreply.github.com>
* Documentation Change
* More documentation fixes
* source formatting (clang-format v11) (#106)
Co-authored-by: bwelton <bwelton@users.noreply.github.com>
* Threading fixes
* Threading fixes
* source formatting (clang-format v11) (#107)
Co-authored-by: bwelton <bwelton@users.noreply.github.com>
* Threading fixes
* More test fixes
* More agent fixes
* More build fixes
* source formatting (clang-format v11) (#109)
Co-authored-by: bwelton <bwelton@users.noreply.github.com>
* changed test timeouts
* Build fix
* Build fix
* Updates to agent
* source formatting (clang-format v11) (#114)
Co-authored-by: bwelton <bwelton@users.noreply.github.com>
* cmake formatting (cmake-format) (#113)
Co-authored-by: bwelton <bwelton@users.noreply.github.com>
* remove git worktree folder
* Doc update
* testing fix
* Another test fix
* More test changes
* Rebase
* source formatting (clang-format v11) (#116)
Co-authored-by: bwelton <bwelton@users.noreply.github.com>
* Documentation
* source formatting (clang-format v11) (#119)
Co-authored-by: bwelton <bwelton@users.noreply.github.com>
* PTL Changes
* Minor agent fix for empty labels
* source formatting (clang-format v11) (#120)
Co-authored-by: bwelton <bwelton@users.noreply.github.com>
* Minor agent fix for empty labels
* Refactor read_map
* source formatting (clang-format v11) (#121)
Co-authored-by: bwelton <bwelton@users.noreply.github.com>
* Refactor read_map
* Cache fixes
* source formatting (clang-format v11) (#122)
Co-authored-by: bwelton <bwelton@users.noreply.github.com>
---------
Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
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: 010693b795]
This commit is contained in:
@@ -38,37 +38,44 @@ ROCPROFILER_EXTERN_C_INIT
|
||||
* @brief Query Counter name.
|
||||
*
|
||||
* @param [in] counter_id
|
||||
* @param [out] name if nullptr, size will be returned
|
||||
* @param [out] size
|
||||
* @param [out] name returns a pointer to the name of the counter
|
||||
* @param [out] size returns the size of the name returned
|
||||
* @return ::rocprofiler_status_t
|
||||
*/
|
||||
rocprofiler_status_t ROCPROFILER_API
|
||||
rocprofiler_query_counter_name(rocprofiler_counter_id_t counter_id, const char* name, size_t* size)
|
||||
ROCPROFILER_NONNULL(3);
|
||||
rocprofiler_query_counter_name(rocprofiler_counter_id_t counter_id, const char** name, size_t* size)
|
||||
ROCPROFILER_NONNULL(2, 3);
|
||||
|
||||
/**
|
||||
* @brief Query Counter Instances Count.
|
||||
*
|
||||
* @param [in] counter_id
|
||||
* @param [out] instance_count
|
||||
* @param [in] agent rocprofiler agent
|
||||
* @param [in] counter_id counter id (obtained from iterate_agent_supported_counters)
|
||||
* @param [out] instance_count number of instances the counter has
|
||||
* @return rocprofiler_status_t
|
||||
*/
|
||||
rocprofiler_status_t ROCPROFILER_API
|
||||
rocprofiler_query_counter_instance_count(rocprofiler_counter_id_t counter_id,
|
||||
size_t* instance_count) ROCPROFILER_NONNULL(2);
|
||||
rocprofiler_query_counter_instance_count(rocprofiler_agent_t agent,
|
||||
rocprofiler_counter_id_t counter_id,
|
||||
size_t* instance_count) ROCPROFILER_NONNULL(3);
|
||||
|
||||
typedef rocprofiler_status_t (*rocprofiler_available_counters_cb_t)(
|
||||
rocprofiler_counter_id_t* counters,
|
||||
size_t num_counters,
|
||||
void* user_data);
|
||||
|
||||
/**
|
||||
* @brief Query Agent Counters Availability.
|
||||
*
|
||||
* @param [in] agent
|
||||
* @param [out] counters_list
|
||||
* @param [out] counters_count
|
||||
* @param [in] cb callback to caller to get counters
|
||||
* @param [in] user_data data to pass into the callback
|
||||
* @return ::rocprofiler_status_t
|
||||
*/
|
||||
rocprofiler_status_t ROCPROFILER_API
|
||||
rocprofiler_query_agent_supported_counters(rocprofiler_agent_t agent,
|
||||
rocprofiler_counter_id_t* counters_list,
|
||||
size_t* counters_count) ROCPROFILER_NONNULL(2, 3);
|
||||
rocprofiler_iterate_agent_supported_counters(rocprofiler_agent_t agent,
|
||||
rocprofiler_available_counters_cb_t cb,
|
||||
void* user_data) ROCPROFILER_NONNULL(2);
|
||||
|
||||
/** @} */
|
||||
|
||||
|
||||
@@ -69,28 +69,28 @@ typedef struct
|
||||
* @param [in] config
|
||||
*/
|
||||
typedef void (*rocprofiler_profile_counting_dispatch_callback_t)(
|
||||
rocprofiler_queue_id_t queue_id,
|
||||
rocprofiler_agent_t agent_id,
|
||||
rocprofiler_correlation_id_t correlation_id,
|
||||
const hsa_kernel_dispatch_packet_t* dispatch_packet,
|
||||
void* callback_data_args,
|
||||
rocprofiler_profile_config_id_t* config);
|
||||
rocprofiler_queue_id_t queue_id,
|
||||
rocprofiler_agent_t agent_id,
|
||||
rocprofiler_correlation_id_t correlation_id,
|
||||
const hsa_kernel_dispatch_packet_t* dispatch_packet,
|
||||
void* callback_data_args,
|
||||
rocprofiler_dispatch_profile_counting_record_t** records,
|
||||
size_t record_count,
|
||||
rocprofiler_profile_config_id_t config);
|
||||
|
||||
/**
|
||||
* @brief Configure Dispatch Profile Counting Service.
|
||||
*
|
||||
* @param [in] context_id
|
||||
* @param [in] agent_id
|
||||
* @param [in] buffer_id
|
||||
* @param [in] callback
|
||||
* @param [in] callback_data_args
|
||||
* @param [in] context_id context id
|
||||
* @param [in] profile profile config to use for dispatch
|
||||
* @param [in] callback callback
|
||||
* @param [in] callback_data_args callback data
|
||||
* @return ::rocprofiler_status_t
|
||||
*/
|
||||
rocprofiler_status_t ROCPROFILER_API
|
||||
rocprofiler_configure_dispatch_profile_counting_service(
|
||||
rocprofiler_context_id_t context_id,
|
||||
rocprofiler_agent_t agent_id,
|
||||
rocprofiler_buffer_id_t buffer_id,
|
||||
rocprofiler_profile_config_id_t profile,
|
||||
rocprofiler_profile_counting_dispatch_callback_t callback,
|
||||
void* callback_data_args);
|
||||
|
||||
|
||||
@@ -69,6 +69,8 @@ typedef enum // NOLINT(performance-enum-size)
|
||||
ROCPROFILER_STATUS_ERROR_NOT_IMPLEMENTED, ///< Function is not implemented
|
||||
ROCPROFILER_STATUS_ERROR_INCOMPATIBLE_ABI, ///< Data structure provided by user is incompatible
|
||||
///< with current version of rocprofiler
|
||||
ROCPROFILER_STATUS_ERROR_AGENT_NOT_FOUND, ///< Agent not found
|
||||
ROCPROFILER_STATUS_ERROR_COUNTER_NOT_FOUND, ///< Counter does not exist
|
||||
ROCPROFILER_STATUS_LAST,
|
||||
} rocprofiler_status_t;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user