[rocprof-sys] Refactor trace_cache architecture with improved type erasure and processing pipeline (#1710)
- Redesigned buffer_storage with a flush_worker pattern for better thread management and resource cleanup - Introduced type-safe abstractions through new components: cacheable.hpp, cache_type_traits.hpp, sample_processor.hpp, and type_registry.hpp - Optimized type erasure implementation in sample processor to reduce runtime overhead - Renamed rocpd_post_processing to rocpd_processor and restructured the processing pipeline - Removed storage_parser.cpp and integrated functionality into header-based template implementation - Enhanced cache_manager with improved processing workflow and better separation of concerns
This commit is contained in:
committed by
GitHub
parent
2f6fb89c51
commit
4d670099fa
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "core/agent.hpp"
|
||||
#include "core/trace_cache/cache_manager.hpp"
|
||||
#include "core/trace_cache/cache_utility.hpp"
|
||||
#include "core/trace_cache/cacheable.hpp"
|
||||
#include "core/trace_cache/sample_type.hpp"
|
||||
#include <amd_smi/amdsmi.h>
|
||||
#include <cstdint>
|
||||
@@ -693,12 +693,11 @@ data::sample(uint32_t _device_id)
|
||||
// Store samples if basic metrics are enabled OR if there's advanced metric data
|
||||
if(_basic_metrics_enabled || has_data)
|
||||
{
|
||||
trace_cache::get_buffer_storage().store(
|
||||
trace_cache::entry_type::amd_smi_sample, serialize_settings(m_dev_id),
|
||||
_device_id, _timestamp, m_busy_perc.gfx_activity,
|
||||
m_busy_perc.umc_activity, m_busy_perc.mm_activity,
|
||||
m_power.current_socket_power, m_temp, m_mem_usage,
|
||||
serialize_gpu_metrics(m_dev_id, metrics, capabilities));
|
||||
trace_cache::get_buffer_storage().store(trace_cache::amd_smi_sample{
|
||||
serialize_settings(m_dev_id), _device_id, _timestamp,
|
||||
m_busy_perc.gfx_activity, m_busy_perc.umc_activity,
|
||||
m_busy_perc.mm_activity, m_power.current_socket_power, m_temp,
|
||||
m_mem_usage, serialize_gpu_metrics(m_dev_id, metrics, capabilities) });
|
||||
|
||||
if(has_data) m_gpu_metrics.push_back(metrics);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user