From 4c998993bda1475595be5505690ff4e08dc2389e Mon Sep 17 00:00:00 2001 From: Sadik Armagan Date: Tue, 25 Feb 2020 12:44:44 +0000 Subject: IVGCVSW-4454 Remove the CounterSet and Device fields from Category Signed-off-by: Sadik Armagan Change-Id: I721f59cd1f6d068e02dabd62c42871a43be9d934 --- src/profiling/SendCounterPacket.cpp | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) (limited to 'src/profiling/SendCounterPacket.cpp') 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 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(deviceUid) << 16) | - (static_cast(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(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 -- cgit v1.2.1