[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:
Milan Radosavljevic
2025-11-20 20:18:13 +01:00
committed by GitHub
parent 2f6fb89c51
commit 4d670099fa
27 changed files with 2876 additions and 1854 deletions
@@ -260,14 +260,13 @@ sample()
auto _freqs = component::cpu_freq{}.sample();
// user and kernel mode times are in microseconds
trace_cache::get_buffer_storage().store(
trace_cache::entry_type::cpu_freq_sample, _timestamp, tim::get_page_rss(),
tim::get_virt_mem(), _rcache.get_peak_rss(),
trace_cache::get_buffer_storage().store(trace_cache::cpu_freq_sample{
_timestamp, tim::get_page_rss(), tim::get_virt_mem(), _rcache.get_peak_rss(),
_rcache.get_num_priority_context_switch() +
_rcache.get_num_voluntary_context_switch(),
_rcache.get_num_major_page_faults() + _rcache.get_num_minor_page_faults(),
_rcache.get_user_mode_time() * 1000, _rcache.get_kernel_mode_time() * 1000,
serialize_freqs(_freqs));
serialize_freqs(_freqs) });
data.emplace_back(
_timestamp, tim::get_page_rss(), tim::get_virt_mem(), _rcache.get_peak_rss(),