[SDK][rocprofv3] Buffer tracing records with args (HIP) (#285)
* [SDK][rocprofv3] HIP API buffer records with args (ext) - New buffer tracing domain(s) for HIP APIs which include the arguments and the return value in the buffer records - Update HIP stream support for extended HIP buffer tracing - Update rocprofv3 tool library and output library to use extended HIP buffer tracing recods * Update stream.cpp - handle hipStream_t address being reused for a new stream * Update doxygen docs for rocprofiler_iterate_buffer_tracing_record_args * Update rocprofv3 tool.cpp - configure buffer tracing services with HIP_*_API_EXT variants - tweak logging level for hip_stream_display_callback * Fix validation tests - add HIP_RUNTIME_API_EXT and HIP_COMPILER_API_EXT to valid domain names * Serialization support for buffer tracing args * Disable stream service for __hipPopCallConfiguration - this is interpreted as a stream create but it doesn't create a stream * Fix execute_buffer_record_emplace for HIP extended contexts * Add uint64_t_retval to rocprofiler_hip_api_retval_t union - reading in hipError_t_retval during serialization of pointer return value causes undefined behavior * Fix compilation warning about unused but set parameter - in hip/stream.cpp * Add synchronization for async_copy_data * Fix compilation error * Fix compilation error --------- Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
2d072f9217
Коммит
e33dff7ad0
@@ -138,7 +138,7 @@ buffered_output<Tp, DomainT>::destroy()
|
||||
}
|
||||
|
||||
using hip_buffered_output_t =
|
||||
buffered_output<rocprofiler_buffer_tracing_hip_api_record_t, domain_type::HIP>;
|
||||
buffered_output<rocprofiler_buffer_tracing_hip_api_ext_record_t, domain_type::HIP>;
|
||||
using hsa_buffered_output_t =
|
||||
buffered_output<rocprofiler_buffer_tracing_hsa_api_record_t, domain_type::HSA>;
|
||||
using marker_buffered_output_t =
|
||||
|
||||
@@ -316,10 +316,10 @@ generate_csv(const output_config& cfg,
|
||||
}
|
||||
|
||||
void
|
||||
generate_csv(const output_config& cfg,
|
||||
const metadata& tool_metadata,
|
||||
const generator<rocprofiler_buffer_tracing_hip_api_record_t>& data,
|
||||
const stats_entry_t& stats)
|
||||
generate_csv(const output_config& cfg,
|
||||
const metadata& tool_metadata,
|
||||
const generator<rocprofiler_buffer_tracing_hip_api_ext_record_t>& data,
|
||||
const stats_entry_t& stats)
|
||||
{
|
||||
if(data.empty()) return;
|
||||
|
||||
|
||||
@@ -46,10 +46,10 @@ generate_csv(const output_config& cfg,
|
||||
const stats_entry_t& stats);
|
||||
|
||||
void
|
||||
generate_csv(const output_config& cfg,
|
||||
const metadata& tool_metadata,
|
||||
const generator<rocprofiler_buffer_tracing_hip_api_record_t>& data,
|
||||
const stats_entry_t& stats);
|
||||
generate_csv(const output_config& cfg,
|
||||
const metadata& tool_metadata,
|
||||
const generator<rocprofiler_buffer_tracing_hip_api_ext_record_t>& data,
|
||||
const stats_entry_t& stats);
|
||||
|
||||
void
|
||||
generate_csv(const output_config& cfg,
|
||||
|
||||
@@ -187,7 +187,7 @@ write_json(json_output& json_ar,
|
||||
const output_config& /*cfg*/,
|
||||
const metadata& /*tool_metadata*/,
|
||||
const domain_stats_vec_t& domain_stats,
|
||||
generator<rocprofiler_buffer_tracing_hip_api_record_t>&& hip_api_gen,
|
||||
generator<rocprofiler_buffer_tracing_hip_api_ext_record_t>&& hip_api_gen,
|
||||
generator<rocprofiler_buffer_tracing_hsa_api_record_t> hsa_api_gen,
|
||||
generator<tool_buffer_tracing_kernel_dispatch_with_stream_record_t> kernel_dispatch_gen,
|
||||
generator<tool_buffer_tracing_memory_copy_with_stream_record_t> memory_copy_gen,
|
||||
|
||||
@@ -85,7 +85,7 @@ write_json(json_output& j
|
||||
const output_config& cfg,
|
||||
const metadata& tool_metadata,
|
||||
const domain_stats_vec_t& domain_stats,
|
||||
generator<rocprofiler_buffer_tracing_hip_api_record_t>&& hip_api_gen,
|
||||
generator<rocprofiler_buffer_tracing_hip_api_ext_record_t>&& hip_api_gen,
|
||||
generator<rocprofiler_buffer_tracing_hsa_api_record_t> hsa_api_gen,
|
||||
generator<tool_buffer_tracing_kernel_dispatch_with_stream_record_t> kernel_dispatch_gen,
|
||||
generator<tool_buffer_tracing_memory_copy_with_stream_record_t> memory_copy_gen,
|
||||
|
||||
@@ -360,7 +360,7 @@ write_otf2(
|
||||
const metadata& tool_metadata,
|
||||
uint64_t pid,
|
||||
const std::vector<agent_info>& agent_data,
|
||||
std::deque<rocprofiler_buffer_tracing_hip_api_record_t>* hip_api_data,
|
||||
std::deque<rocprofiler_buffer_tracing_hip_api_ext_record_t>* hip_api_data,
|
||||
std::deque<rocprofiler_buffer_tracing_hsa_api_record_t>* hsa_api_data,
|
||||
std::deque<tool_buffer_tracing_kernel_dispatch_with_stream_record_t>* kernel_dispatch_data,
|
||||
std::deque<tool_buffer_tracing_memory_copy_with_stream_record_t>* memory_copy_data,
|
||||
|
||||
@@ -40,7 +40,7 @@ write_otf2(
|
||||
const metadata& tool_metadata,
|
||||
uint64_t pid,
|
||||
const std::vector<agent_info>& agent_data,
|
||||
std::deque<rocprofiler_buffer_tracing_hip_api_record_t>* hip_api_data,
|
||||
std::deque<rocprofiler_buffer_tracing_hip_api_ext_record_t>* hip_api_data,
|
||||
std::deque<rocprofiler_buffer_tracing_hsa_api_record_t>* hsa_api_data,
|
||||
std::deque<tool_buffer_tracing_kernel_dispatch_with_stream_record_t>* kernel_dispatch_data,
|
||||
std::deque<tool_buffer_tracing_memory_copy_with_stream_record_t>* memory_copy_data,
|
||||
|
||||
@@ -68,7 +68,7 @@ write_perfetto(
|
||||
const output_config& ocfg,
|
||||
const metadata& tool_metadata,
|
||||
std::vector<agent_info> agent_data,
|
||||
const generator<rocprofiler_buffer_tracing_hip_api_record_t>& hip_api_gen,
|
||||
const generator<rocprofiler_buffer_tracing_hip_api_ext_record_t>& hip_api_gen,
|
||||
const generator<rocprofiler_buffer_tracing_hsa_api_record_t>& hsa_api_gen,
|
||||
const generator<tool_buffer_tracing_kernel_dispatch_with_stream_record_t>& kernel_dispatch_gen,
|
||||
const generator<tool_buffer_tracing_memory_copy_with_stream_record_t>& memory_copy_gen,
|
||||
|
||||
@@ -40,7 +40,7 @@ write_perfetto(
|
||||
const output_config& cfg,
|
||||
const metadata& tool_metadata,
|
||||
std::vector<agent_info> agent_data,
|
||||
const generator<rocprofiler_buffer_tracing_hip_api_record_t>& hip_api_gen,
|
||||
const generator<rocprofiler_buffer_tracing_hip_api_ext_record_t>& hip_api_gen,
|
||||
const generator<rocprofiler_buffer_tracing_hsa_api_record_t>& hsa_api_gen,
|
||||
const generator<tool_buffer_tracing_kernel_dispatch_with_stream_record_t>& kernel_dispatch_gen,
|
||||
const generator<tool_buffer_tracing_memory_copy_with_stream_record_t>& memory_copy_gen,
|
||||
|
||||
@@ -83,8 +83,8 @@ generate_stats(const output_config& /*cfg*/,
|
||||
|
||||
stats_entry_t
|
||||
generate_stats(const output_config& /*cfg*/,
|
||||
const metadata& tool_metadata,
|
||||
const generator<rocprofiler_buffer_tracing_hip_api_record_t>& data)
|
||||
const metadata& tool_metadata,
|
||||
const generator<rocprofiler_buffer_tracing_hip_api_ext_record_t>& data)
|
||||
{
|
||||
auto hip_stats = stats_map_t{};
|
||||
for(auto ditr : data)
|
||||
|
||||
@@ -37,9 +37,9 @@ generate_stats(const output_config& cfg,
|
||||
const generator<tool_buffer_tracing_kernel_dispatch_with_stream_record_t>& data);
|
||||
|
||||
stats_entry_t
|
||||
generate_stats(const output_config& cfg,
|
||||
const metadata& tool_metadata,
|
||||
const generator<rocprofiler_buffer_tracing_hip_api_record_t>& data);
|
||||
generate_stats(const output_config& cfg,
|
||||
const metadata& tool_metadata,
|
||||
const generator<rocprofiler_buffer_tracing_hip_api_ext_record_t>& data);
|
||||
|
||||
stats_entry_t
|
||||
generate_stats(const output_config& cfg,
|
||||
|
||||
Ссылка в новой задаче
Block a user