Renamed agent profiling service to device counting service (#1132)

* Renamed agent profiling service to device counting service

Name more aptly represents what agent profiling did (device wide
counter collection). Conversion of existing user code can be
performed by the following find/sed command:

find . -type f -exec sed -i 's/rocprofiler_agent_profile_callback_t/rocprofiler_device_counting_service_callback_t/g; s/rocprofiler_configure_agent_profile_counting_service/rocprofiler_configure_device_counting_service/g; s/agent_profile.h/device_counting_service.h/g; s/rocprofiler_sample_agent_profile_counting_service/rocprofiler_sample_device_counting_service/g' {} +

* Converted dispatch profile to dispatch counting service

* Debug for functioal counters test

* Minor changes for CI

* Minor fix

* More fixes for CI

* Update evaluate_ast.cpp

---------

Co-authored-by: Benjamin Welton <ben@amd.com>
This commit is contained in:
Benjamin Welton
2024-10-18 01:44:11 -07:00
gecommit door GitHub
bovenliggende 320427b5f5
commit bb69467765
44 gewijzigde bestanden met toevoegingen van 327 en 264 verwijderingen
@@ -323,7 +323,7 @@ start_context(rocprofiler_context_id_t context_id)
if(cfg->counter_collection) rocprofiler::counters::start_context(cfg);
if(cfg->agent_thread_trace) cfg->agent_thread_trace->start_context();
if(cfg->dispatch_thread_trace) cfg->dispatch_thread_trace->start_context();
if(cfg->agent_counter_collection) status = rocprofiler::counters::start_agent_ctx(cfg);
if(cfg->device_counter_collection) status = rocprofiler::counters::start_agent_ctx(cfg);
#if ROCPROFILER_SDK_HSA_PC_SAMPLING > 0
if(cfg->pc_sampler) status = rocprofiler::pc_sampling::start_service(cfg);
#endif
@@ -360,7 +360,7 @@ stop_context(rocprofiler_context_id_t idx)
if(_expected->dispatch_thread_trace)
_expected->dispatch_thread_trace->stop_context();
if(_expected->agent_counter_collection)
if(_expected->device_counter_collection)
{
rocprofiler::counters::stop_agent_ctx(const_cast<context*>(_expected));
}
@@ -30,8 +30,8 @@
#include "lib/common/synchronized.hpp"
#include "lib/rocprofiler-sdk/context/correlation_id.hpp"
#include "lib/rocprofiler-sdk/context/domain.hpp"
#include "lib/rocprofiler-sdk/counters/agent_profiling.hpp"
#include "lib/rocprofiler-sdk/counters/core.hpp"
#include "lib/rocprofiler-sdk/counters/device_counting.hpp"
#include "lib/rocprofiler-sdk/external_correlation.hpp"
#include "lib/rocprofiler-sdk/pc_sampling/types.hpp"
#include "lib/rocprofiler-sdk/thread_trace/att_core.hpp"
@@ -89,7 +89,7 @@ struct dispatch_counter_collection_service
common::Synchronized<bool> enabled{false};
};
struct agent_counter_collection_service
struct device_counting_service
{
std::vector<rocprofiler::counters::agent_callback_data> agent_data;
@@ -97,7 +97,8 @@ struct agent_counter_collection_service
{
DISABLED,
LOCKED,
ENABLED
ENABLED,
EXIT
};
std::atomic<state> status{state::DISABLED};
@@ -124,9 +125,9 @@ struct context
std::unique_ptr<callback_tracing_service> callback_tracer = {};
std::unique_ptr<buffer_tracing_service> buffered_tracer = {};
// Only one of counter collection/agent counter collection can exists in the ctx.
std::unique_ptr<dispatch_counter_collection_service> counter_collection = {};
std::unique_ptr<agent_counter_collection_service> agent_counter_collection = {};
std::unique_ptr<pc_sampling_service> pc_sampler = {};
std::unique_ptr<dispatch_counter_collection_service> counter_collection = {};
std::unique_ptr<device_counting_service> device_counter_collection = {};
std::unique_ptr<pc_sampling_service> pc_sampler = {};
std::unique_ptr<thread_trace::DispatchThreadTracer> dispatch_thread_trace = {};
std::unique_ptr<thread_trace::AgentThreadTracer> agent_thread_trace = {};