Removed duplicated code (#784)
* Removed duplicated code * Clang format * Removing union from pc_sampling API * Clang format
This commit is contained in:
committed by
GitHub
parent
b570ff5273
commit
b6c0b50d3e
@@ -65,7 +65,7 @@ public:
|
||||
submit(uni);
|
||||
}
|
||||
|
||||
std::vector<std::vector<pcsample_v1_t>> get_parsed_buffer(int GFXIP_MAJOR)
|
||||
std::vector<std::vector<rocprofiler_pc_sampling_record_s>> get_parsed_buffer(int GFXIP_MAJOR)
|
||||
{
|
||||
parsed_data = {};
|
||||
|
||||
@@ -78,16 +78,18 @@ public:
|
||||
return parsed_data;
|
||||
}
|
||||
|
||||
static uint64_t alloc_parse_memory(pcsample_v1_t** sample, uint64_t req_size, void* userdata)
|
||||
static uint64_t alloc_parse_memory(rocprofiler_pc_sampling_record_s** sample,
|
||||
uint64_t req_size,
|
||||
void* userdata)
|
||||
{
|
||||
auto* buffer = reinterpret_cast<MockRuntimeBuffer*>(userdata);
|
||||
buffer->parsed_data.push_back(std::vector<pcsample_v1_t>(req_size));
|
||||
buffer->parsed_data.push_back(std::vector<rocprofiler_pc_sampling_record_s>(req_size));
|
||||
*sample = buffer->parsed_data.back().data();
|
||||
return req_size;
|
||||
}
|
||||
|
||||
std::vector<packet_union_t> packets;
|
||||
std::vector<std::vector<pcsample_v1_t>> parsed_data;
|
||||
std::vector<packet_union_t> packets;
|
||||
std::vector<std::vector<rocprofiler_pc_sampling_record_s>> parsed_data;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user