[SDK] Expose counter dims in rocprofiler_counter_info_v1_t and only show counters being profiled in metadata. (#325)
* expose dimensional info in rocprofiler_counter_info_v1_t. * add counter_id in dim info. * address review comments * format. * address comments. * use array of pointers for dimensions_instaces. * format and comments. * address comments. * new line. * Update counter_defs.yaml * Update counter_defs.yaml * Update counter_defs.yaml * counter_defs. * format counter defs. * format counter defs. * format counter defs. * show only counters being profiled in metadata. * Format. * use config for counters and fix warnings. * add version for rocprofiler_counter_dimension_info_v1_t struct. * rename rocprofiler_counter_record_dimension_instance_v1_info_t. * account device id from pmc for counters metadata. * move dim structs to counters.h. * address comments to compare value. * fix tests. * Address comments. use pointer of arrays for ABI. * rebase. * fix build error. * use separate metadata::init() for rocprofv3. * also print not found counters. * precompute all the perf counters needed to be in metadata. * Misc. * format * Format. * rocprofiler::sdk::container::c_array * Address comments. * source/lib/output/metadata.cpp * lint. * add unit test for c_array. * add unit test and serialization support for c_array container. * Misc. * Clean files. * Format. * clang-tidy. * add more checks to c_array. * misc. typo * Addr comments. --------- Co-authored-by: Venkateshwar Reddy Kandula <vkandula@amd.com> Co-authored-by: Jonathan R. Madsen <Jonathan.Madsen@amd.com>
Este commit está contenido en:
cometido por
GitHub
padre
e948034c83
commit
bf0fad1d54
@@ -112,7 +112,7 @@ fill_dimension_cache(rocprofiler_counter_id_t counter)
|
||||
(*dimension_cache())
|
||||
->emplace(counter.handle,
|
||||
std::vector<rocprofiler_counter_record_dimension_info_t>{
|
||||
info.dimensions, info.dimensions + info.dimensions_count});
|
||||
*info.dimensions, *info.dimensions + info.dimensions_count});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -294,7 +294,7 @@ counter_sampler::get_counter_size(rocprofiler_counter_id_t counter)
|
||||
ROCPROFILER_CALL(rocprofiler_query_counter_info(
|
||||
counter, ROCPROFILER_COUNTER_INFO_VERSION_1, static_cast<void*>(&info)),
|
||||
"Could not query info for counter");
|
||||
return info.instance_ids_count;
|
||||
return info.dimensions_instances_count;
|
||||
}
|
||||
|
||||
std::unordered_map<std::string, rocprofiler_counter_id_t>
|
||||
@@ -339,7 +339,7 @@ counter_sampler::get_counter_dimensions(rocprofiler_counter_id_t counter)
|
||||
counter, ROCPROFILER_COUNTER_INFO_VERSION_1, static_cast<void*>(&info)),
|
||||
"Could not query info for counter");
|
||||
return std::vector<rocprofiler_counter_record_dimension_info_t>{
|
||||
info.dimensions, info.dimensions + info.dimensions_count};
|
||||
*info.dimensions, *info.dimensions + info.dimensions_count};
|
||||
}
|
||||
|
||||
std::atomic<bool>&
|
||||
|
||||
@@ -292,7 +292,7 @@ dispatch_callback(rocprofiler_dispatch_counting_service_data_t dispatch_data,
|
||||
"Could not query counter_id");
|
||||
cap.expected_counter_names.emplace(found_counter.handle, std::string(info.name));
|
||||
cap.remaining.push_back(found_counter);
|
||||
cap.expected.emplace(found_counter.handle, info.instance_ids_count);
|
||||
cap.expected.emplace(found_counter.handle, info.dimensions_instances_count);
|
||||
|
||||
auto& info_vector =
|
||||
cap.expected_data_dims.emplace(found_counter.handle, validate_dim_presence{})
|
||||
@@ -300,7 +300,7 @@ dispatch_callback(rocprofiler_dispatch_counting_service_data_t dispatch_data,
|
||||
|
||||
for(uint64_t i = 0; i < info.dimensions_count; i++)
|
||||
{
|
||||
info_vector.maybe_forward(info.dimensions[i]);
|
||||
info_vector.maybe_forward(*info.dimensions[i]);
|
||||
}
|
||||
}
|
||||
if(cap.expected.empty())
|
||||
|
||||
Referencia en una nueva incidencia
Block a user