[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
Šī revīzija ir iekļauta:
Milan Radosavljevic
2025-11-20 20:18:13 +01:00
revīziju iesūtīja GitHub
vecāks 2f6fb89c51
revīzija 4d670099fa
27 mainīti faili ar 2876 papildinājumiem un 1854 dzēšanām
@@ -315,13 +315,12 @@ cache_sampling_data(int64_t _tid, const std::vector<timer_sampling_data>& _timer
auto _call_stack = generate_call_stack_json(iitr);
auto _line_info = generate_line_info_json(iitr);
trace_cache::get_buffer_storage().store(
trace_cache::entry_type::backtrace_region_sample,
trace_cache::get_buffer_storage().store(trace_cache::backtrace_region_sample{
static_cast<uint32_t>(ROCPROFSYS_CATEGORY_TIMER_SAMPLING),
static_cast<uint64_t>(_thread_info->index_data->system_value),
_track_name.c_str(), _name.c_str(), itr.m_beg, itr.m_end,
trait::name<category::timer_sampling>::value, _call_stack.c_str(),
_line_info.c_str(), "{}");
_line_info.c_str(), "{}" });
}
}
@@ -348,13 +347,12 @@ cache_sampling_data(int64_t _tid, const std::vector<timer_sampling_data>& _timer
auto _call_stack = generate_call_stack_json(iitr);
auto _line_info = generate_line_info_json(iitr);
trace_cache::get_buffer_storage().store(
trace_cache::entry_type::backtrace_region_sample,
trace_cache::get_buffer_storage().store(trace_cache::backtrace_region_sample{
static_cast<uint32_t>(ROCPROFSYS_CATEGORY_OVERFLOW_SAMPLING),
static_cast<uint64_t>(_thread_info->index_data->system_value),
_track_name.c_str(), _name.c_str(), itr.m_beg, itr.m_end,
trait::name<category::overflow_sampling>::value, _call_stack.c_str(),
_line_info.c_str(), "{}");
_line_info.c_str(), "{}" });
}
}
}