@@ -69,6 +69,7 @@ void metric_validate_stall_sampling_data(
6969 std::vector<zet_typed_value_t > &totalMetricValues,
7070 std::vector<uint32_t > &metricValueSets) {
7171
72+ uint32_t ipOffset = UINT32_MAX;
7273 uint32_t activeOffset = UINT32_MAX;
7374 uint32_t controlStallOffset = UINT32_MAX;
7475 uint32_t pipeStallOffset = UINT32_MAX;
@@ -77,10 +78,14 @@ void metric_validate_stall_sampling_data(
7778 uint32_t sbidStallOffset = UINT32_MAX;
7879 uint32_t syncStallOffset = UINT32_MAX;
7980 uint32_t instrFetchStallOffset = UINT32_MAX;
80- uint32_t otherStallOffset = UINT32_MAX;
81+ uint32_t otherStallOffset = UINT32_MAX;
8182
8283 for (uint32_t i = 0 ; i < to_u32 (metricProperties.size ()); i++) {
8384
85+ if (strcmp (" IP" , metricProperties[i].name ) == 0 ) {
86+ ipOffset = i;
87+ continue ;
88+ }
8489 if (strcmp (" Active" , metricProperties[i].name ) == 0 ) {
8590 activeOffset = i;
8691 continue ;
@@ -119,6 +124,7 @@ void metric_validate_stall_sampling_data(
119124 }
120125 }
121126
127+ uint64_t IpAddress = 0 ;
122128 uint64_t ActiveCount = 0 ;
123129 uint64_t ControlStallCount = 0 ;
124130 uint64_t PipeStallCount = 0 ;
@@ -127,7 +133,7 @@ void metric_validate_stall_sampling_data(
127133 uint64_t SbidStallCount = 0 ;
128134 uint64_t SyncStallCount = 0 ;
129135 uint64_t InstrFetchStallCount = 0 ;
130- uint64_t OtherStallCount = 0 ;
136+ uint64_t OtherStallCount = 0 ;
131137
132138 uint32_t metricSetStartIndex = 0 ;
133139
@@ -152,6 +158,7 @@ void metric_validate_stall_sampling_data(
152158 for (uint32_t report = 0 ; report < reportCount; report++) {
153159
154160 tmpStallCount = 0 ;
161+ reportCompleteFlag = false ;
155162
156163 auto getStallCount = [&totalMetricValues](uint32_t metricReport,
157164 uint32_t metricPropertiesSize,
@@ -166,41 +173,59 @@ void metric_validate_stall_sampling_data(
166173 };
167174 uint32_t metricPropsSize = to_u32 (metricProperties.size ());
168175
176+ IpAddress =
177+ getStallCount (report, metricPropsSize, ipOffset,
178+ metricSetStartIndex);
179+
169180 tmpStallCount = getStallCount (report, metricPropsSize, activeOffset,
170181 metricSetStartIndex);
182+ reportCompleteFlag |= (tmpStallCount != 0 );
171183 ActiveCount += tmpStallCount;
172184
173185 tmpStallCount = getStallCount (report, metricPropsSize, controlStallOffset,
174186 metricSetStartIndex);
187+ reportCompleteFlag |= (tmpStallCount != 0 );
175188 ControlStallCount += tmpStallCount;
176189
177190 tmpStallCount = getStallCount (report, metricPropsSize, pipeStallOffset,
178191 metricSetStartIndex);
192+ reportCompleteFlag |= (tmpStallCount != 0 );
179193 PipeStallCount += tmpStallCount;
180194
181195 tmpStallCount = getStallCount (report, metricPropsSize, sendStallOffset,
182196 metricSetStartIndex);
197+ reportCompleteFlag |= (tmpStallCount != 0 );
183198 SendStallCount += tmpStallCount;
184199
185200 tmpStallCount = getStallCount (report, metricPropsSize, distStallOffset,
186201 metricSetStartIndex);
202+ reportCompleteFlag |= (tmpStallCount != 0 );
187203 DistStallCount += tmpStallCount;
188204
189205 tmpStallCount = getStallCount (report, metricPropsSize, sbidStallOffset,
190206 metricSetStartIndex);
207+ reportCompleteFlag |= (tmpStallCount != 0 );
191208 SbidStallCount += tmpStallCount;
192209
193210 tmpStallCount = getStallCount (report, metricPropsSize, syncStallOffset,
194211 metricSetStartIndex);
212+ reportCompleteFlag |= (tmpStallCount != 0 );
195213 SyncStallCount += tmpStallCount;
196214
197215 tmpStallCount = getStallCount (report, metricPropsSize,
198216 instrFetchStallOffset, metricSetStartIndex);
217+ reportCompleteFlag |= (tmpStallCount != 0 );
199218 InstrFetchStallCount += tmpStallCount;
200219
201220 tmpStallCount = getStallCount (report, metricPropsSize, otherStallOffset,
202221 metricSetStartIndex);
222+ reportCompleteFlag |= (tmpStallCount != 0 );
203223 OtherStallCount += tmpStallCount;
224+
225+ if (!reportCompleteFlag) {
226+ LOG_INFO << " Report number " << report << " with IP address " << IpAddress
227+ << " has zero for all stall counts" ;
228+ }
204229 }
205230
206231 metricSetStartIndex += metricCountForDataIndex;
0 commit comments