aboutsummaryrefslogtreecommitdiff
path: root/src/profiling/SendCounterPacket.cpp
diff options
context:
space:
mode:
authorSadik Armagan <sadik.armagan@arm.com>2020-02-25 12:44:44 +0000
committerSadik Armagan <sadik.armagan@arm.com>2020-02-28 16:01:46 +0000
commit4c998993bda1475595be5505690ff4e08dc2389e (patch)
tree643dc71e82c8affd842481d4aa389db7de2c5c42 /src/profiling/SendCounterPacket.cpp
parent3b3c381963a1bfe12e083928a3abb5a9852b199b (diff)
downloadarmnn-4c998993bda1475595be5505690ff4e08dc2389e.tar.gz
IVGCVSW-4454 Remove the CounterSet and Device fields from Category
Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I721f59cd1f6d068e02dabd62c42871a43be9d934
Diffstat (limited to 'src/profiling/SendCounterPacket.cpp')
-rw-r--r--src/profiling/SendCounterPacket.cpp20
1 files changed, 5 insertions, 15 deletions
diff --git a/src/profiling/SendCounterPacket.cpp b/src/profiling/SendCounterPacket.cpp
index f60586ed26..b8ef189d6e 100644
--- a/src/profiling/SendCounterPacket.cpp
+++ b/src/profiling/SendCounterPacket.cpp
@@ -182,21 +182,12 @@ bool SendCounterPacket::CreateCategoryRecord(const CategoryPtr& category,
const std::string& categoryName = category->m_Name;
const std::vector<uint16_t> categoryCounters = category->m_Counters;
- uint16_t deviceUid = category->m_DeviceUid;
- uint16_t counterSetUid = category->m_CounterSetUid;
BOOST_ASSERT(!categoryName.empty());
// Utils
size_t uint32_t_size = sizeof(uint32_t);
- // Category record word 0:
- // 16:31 [16] device: the uid of a device element which identifies some hardware device that
- // the category belongs to
- // 0:15 [16] counter_set: the uid of a counter_set the category is associated with
- uint32_t categoryRecordWord0 = (static_cast<uint32_t>(deviceUid) << 16) |
- (static_cast<uint32_t>(counterSetUid));
-
// Category record word 1:
// 16:31 [16] event_count: number of events belonging to this category
// 0:15 [16] reserved: all zeros
@@ -252,7 +243,7 @@ bool SendCounterPacket::CreateCategoryRecord(const CategoryPtr& category,
uint32_t categoryRecordWord3 = numeric_cast<uint32_t>(eventRecordOffsets.size() * uint32_t_size);
// Calculate the size in words of the category record
- size_t categoryRecordSize = 4u + // The size of the fixed part (device + counter_set + event_count + reserved +
+ size_t categoryRecordSize = 3u + // The size of the fixed part (device + counter_set + event_count + reserved +
// event_pointer_table_offset + name_offset)
eventRecordOffsets.size() + // The size of the variable part (the event pointer table +
categoryNameBuffer.size() + // and the category name including the null-terminator +
@@ -263,11 +254,10 @@ bool SendCounterPacket::CreateCategoryRecord(const CategoryPtr& category,
ARMNN_NO_CONVERSION_WARN_BEGIN
// Create the category record
- categoryRecord[0] = categoryRecordWord0; // device + counter_set
- categoryRecord[1] = categoryRecordWord1; // event_count + reserved
- categoryRecord[2] = categoryRecordWord2; // event_pointer_table_offset
- categoryRecord[3] = categoryRecordWord3; // name_offset
- auto offset = categoryRecord.begin() + 4u;
+ categoryRecord[0] = categoryRecordWord1; // event_count + reserved
+ categoryRecord[1] = categoryRecordWord2; // event_pointer_table_offset
+ categoryRecord[2] = categoryRecordWord3; // name_offset
+ auto offset = categoryRecord.begin() + 3u;
std::copy(eventRecordOffsets.begin(), eventRecordOffsets.end(), offset); // event_pointer_table
offset += eventRecordOffsets.size();
std::copy(categoryNameBuffer.begin(), categoryNameBuffer.end(), offset); // name