| 1 |
/* |
| 2 |
* Copyright (C) 2020-2024 Intel Corporation |
| 3 |
* |
| 4 |
* SPDX-License-Identifier: MIT |
| 5 |
* |
| 6 |
*/ |
| 7 |
|
| 8 |
#include "level_zero/tools/source/metrics/metric_oa_enumeration_imp.h" |
| 9 |
#include "level_zero/tools/source/metrics/metric_oa_source.h" |
| 10 |
#include "level_zero/tools/test/unit_tests/sources/metrics/mock_metric_oa.h" |
| 11 |
|
| 12 |
namespace L0 { |
| 13 |
namespace ult { |
| 14 |
|
| 15 |
Mock<MetricEnumeration>::Mock(::L0::OaMetricSourceImp &metricSource) : MetricEnumeration(metricSource) { |
| 16 |
} |
| 17 |
|
| 18 |
MockMetricsDiscoveryApi *Mock<MetricEnumeration>::globalMockApi = nullptr; |
| 19 |
|
| 20 |
TCompletionCode MockMetricsDiscoveryApi::openAdapterGroup(IAdapterGroupLatest **group) { |
| 21 |
*group = Mock<MetricEnumeration>::globalMockApi->adapterGroup; |
| 22 |
return TCompletionCode::CC_OK; |
| 23 |
} |
| 24 |
|
| 25 |
void Mock<MetricEnumeration>::setMockedApi(MockMetricsDiscoveryApi *mockedApi) { |
| 26 |
|
| 27 |
if (mockedApi) { |
| 28 |
|
| 29 |
// Mock class used to communicate with metrics library. |
| 30 |
metricEnumeration = &metricSource.getMetricEnumeration(); |
| 31 |
auto &actualMetricEnumeration = metricSource.getMetricEnumerationObject(); |
| 32 |
actualMetricEnumeration.release(); |
| 33 |
actualMetricEnumeration.reset(this); |
| 34 |
|
| 35 |
// Mock metrics library api functions. |
| 36 |
openAdapterGroup = mockedApi->openAdapterGroup; |
| 37 |
|
| 38 |
// Mock metrics library api. |
| 39 |
Mock<MetricEnumeration>::globalMockApi = mockedApi; |
| 40 |
|
| 41 |
} else { |
| 42 |
|
| 43 |
// Restore an original class used to communicate with metrics library. |
| 44 |
auto &actualMetricEnumeration = metricSource.getMetricEnumerationObject(); |
| 45 |
actualMetricEnumeration.release(); |
| 46 |
actualMetricEnumeration.reset(metricEnumeration); |
| 47 |
} |
| 48 |
} |
| 49 |
|
| 50 |
} // namespace ult |
| 51 |
} // namespace L0 |
| 52 |
|
| 53 |
namespace MetricsDiscovery { |
| 54 |
|
| 55 |
IMetricsDevice_1_0::~IMetricsDevice_1_0() {} |
| 56 |
|
| 57 |
TMetricsDeviceParams_1_0 *IMetricsDevice_1_0::GetParams(void) { |
| 58 |
UNRECOVERABLE_IF(true); |
| 59 |
return nullptr; |
| 60 |
} |
| 61 |
|
| 62 |
IConcurrentGroup_1_0 *IMetricsDevice_1_0::GetConcurrentGroup(uint32_t) { |
| 63 |
UNRECOVERABLE_IF(true); |
| 64 |
return nullptr; |
| 65 |
} |
| 66 |
|
| 67 |
TGlobalSymbol_1_0 *IMetricsDevice_1_0::GetGlobalSymbol(uint32_t) { |
| 68 |
UNRECOVERABLE_IF(true); |
| 69 |
return nullptr; |
| 70 |
} |
| 71 |
|
| 72 |
TTypedValue_1_0 *IMetricsDevice_1_0::GetGlobalSymbolValueByName(const char *name) { |
| 73 |
UNRECOVERABLE_IF(true); |
| 74 |
return nullptr; |
| 75 |
} |
| 76 |
|
| 77 |
TCompletionCode IMetricsDevice_1_0::GetLastError(void) { |
| 78 |
UNRECOVERABLE_IF(true); |
| 79 |
return TCompletionCode::CC_ERROR_NOT_SUPPORTED; |
| 80 |
} |
| 81 |
|
| 82 |
TCompletionCode IMetricsDevice_1_0::GetGpuCpuTimestamps(uint64_t *, uint64_t *, |
| 83 |
uint32_t *) { |
| 84 |
UNRECOVERABLE_IF(true); |
| 85 |
return TCompletionCode::CC_ERROR_NOT_SUPPORTED; |
| 86 |
} |
| 87 |
|
| 88 |
IConcurrentGroup_1_1 *IMetricsDevice_1_1::GetConcurrentGroup(uint32_t) { |
| 89 |
UNRECOVERABLE_IF(true); |
| 90 |
return nullptr; |
| 91 |
} |
| 92 |
|
| 93 |
TMetricsDeviceParams_1_2 *MetricsDiscovery::IMetricsDevice_1_2::GetParams(void) { |
| 94 |
UNRECOVERABLE_IF(true); |
| 95 |
return nullptr; |
| 96 |
} |
| 97 |
|
| 98 |
IOverride_1_2 *IMetricsDevice_1_2::GetOverride(unsigned int) { |
| 99 |
UNRECOVERABLE_IF(true); |
| 100 |
return nullptr; |
| 101 |
} |
| 102 |
|
| 103 |
IOverride_1_2 *IMetricsDevice_1_2::GetOverrideByName(char const *) { |
| 104 |
UNRECOVERABLE_IF(true); |
| 105 |
return nullptr; |
| 106 |
} |
| 107 |
|
| 108 |
IConcurrentGroup_1_5 *IMetricsDevice_1_5::GetConcurrentGroup(uint32_t) { |
| 109 |
UNRECOVERABLE_IF(true); |
| 110 |
return nullptr; |
| 111 |
} |
| 112 |
|
| 113 |
IConcurrentGroup_1_0::~IConcurrentGroup_1_0() {} |
| 114 |
|
| 115 |
TConcurrentGroupParams_1_0 *IConcurrentGroup_1_0::GetParams(void) { |
| 116 |
UNRECOVERABLE_IF(true); |
| 117 |
return nullptr; |
| 118 |
} |
| 119 |
|
| 120 |
IMetricSet_1_0 *IConcurrentGroup_1_0::GetMetricSet(uint32_t index) { |
| 121 |
UNRECOVERABLE_IF(true); |
| 122 |
return nullptr; |
| 123 |
} |
| 124 |
|
| 125 |
TCompletionCode IConcurrentGroup_1_0::OpenIoStream(IMetricSet_1_0 *metricSet, uint32_t processId, uint32_t *nsTimerPeriod, uint32_t *oaBufferSize) { |
| 126 |
UNRECOVERABLE_IF(true); |
| 127 |
return CC_ERROR_NOT_SUPPORTED; |
| 128 |
} |
| 129 |
|
| 130 |
TCompletionCode IConcurrentGroup_1_0::ReadIoStream(uint32_t *reportsCount, char *reportData, uint32_t readFlags) { |
| 131 |
UNRECOVERABLE_IF(true); |
| 132 |
return CC_ERROR_NOT_SUPPORTED; |
| 133 |
} |
| 134 |
|
| 135 |
TCompletionCode IConcurrentGroup_1_0::CloseIoStream(void) { |
| 136 |
UNRECOVERABLE_IF(true); |
| 137 |
return CC_ERROR_NOT_SUPPORTED; |
| 138 |
} |
| 139 |
|
| 140 |
TCompletionCode IConcurrentGroup_1_0::WaitForReports(uint32_t milliseconds) { |
| 141 |
UNRECOVERABLE_IF(true); |
| 142 |
return CC_ERROR_NOT_SUPPORTED; |
| 143 |
} |
| 144 |
|
| 145 |
IInformation_1_0 *IConcurrentGroup_1_0::GetIoMeasurementInformation(uint32_t index) { |
| 146 |
UNRECOVERABLE_IF(true); |
| 147 |
return nullptr; |
| 148 |
} |
| 149 |
|
| 150 |
IInformation_1_0 *IConcurrentGroup_1_0::GetIoGpuContextInformation(uint32_t index) { |
| 151 |
UNRECOVERABLE_IF(true); |
| 152 |
return nullptr; |
| 153 |
} |
| 154 |
|
| 155 |
IMetricSet_1_1 *IConcurrentGroup_1_1::GetMetricSet(uint32_t index) { |
| 156 |
UNRECOVERABLE_IF(true); |
| 157 |
return nullptr; |
| 158 |
} |
| 159 |
|
| 160 |
TCompletionCode IConcurrentGroup_1_3::SetIoStreamSamplingType(TSamplingType type) { |
| 161 |
UNRECOVERABLE_IF(true); |
| 162 |
return CC_ERROR_NOT_SUPPORTED; |
| 163 |
} |
| 164 |
|
| 165 |
IMetricSet_1_5 *IConcurrentGroup_1_5::GetMetricSet(uint32_t index) { |
| 166 |
UNRECOVERABLE_IF(true); |
| 167 |
return nullptr; |
| 168 |
} |
| 169 |
|
| 170 |
IMetricSet_1_0::~IMetricSet_1_0() {} |
| 171 |
|
| 172 |
TMetricSetParams_1_0 *IMetricSet_1_0::GetParams(void) { |
| 173 |
UNRECOVERABLE_IF(true); |
| 174 |
return nullptr; |
| 175 |
} |
| 176 |
|
| 177 |
IMetric_1_0 *IMetricSet_1_0::GetMetric(uint32_t index) { |
| 178 |
UNRECOVERABLE_IF(true); |
| 179 |
return nullptr; |
| 180 |
} |
| 181 |
|
| 182 |
IInformation_1_0 *IMetricSet_1_0::GetInformation(uint32_t index) { |
| 183 |
UNRECOVERABLE_IF(true); |
| 184 |
return nullptr; |
| 185 |
} |
| 186 |
|
| 187 |
IMetricSet_1_0 *IMetricSet_1_0::GetComplementaryMetricSet(uint32_t index) { |
| 188 |
UNRECOVERABLE_IF(true); |
| 189 |
return nullptr; |
| 190 |
} |
| 191 |
|
| 192 |
TCompletionCode IMetricSet_1_0::Activate(void) { |
| 193 |
UNRECOVERABLE_IF(true); |
| 194 |
return CC_ERROR_NOT_SUPPORTED; |
| 195 |
} |
| 196 |
|
| 197 |
TCompletionCode IMetricSet_1_0::Deactivate(void) { |
| 198 |
UNRECOVERABLE_IF(true); |
| 199 |
return CC_ERROR_NOT_SUPPORTED; |
| 200 |
} |
| 201 |
|
| 202 |
IMetric_1_0 *IMetricSet_1_0::AddCustomMetric( |
| 203 |
const char *symbolName, const char *shortName, const char *groupName, const char *longName, const char *dxToOglAlias, |
| 204 |
uint32_t usageFlagsMask, uint32_t apiMask, TMetricResultType resultType, const char *resultUnits, TMetricType metricType, |
| 205 |
int64_t loWatermark, int64_t hiWatermark, THwUnitType hwType, const char *ioReadEquation, const char *deltaFunction, |
| 206 |
const char *queryReadEquation, const char *normalizationEquation, const char *maxValueEquation, const char *signalName) { |
| 207 |
UNRECOVERABLE_IF(true); |
| 208 |
return nullptr; |
| 209 |
} |
| 210 |
|
| 211 |
IMetricSet_1_1 ::~IMetricSet_1_1() {} |
| 212 |
|
| 213 |
TCompletionCode IMetricSet_1_1::SetApiFiltering(uint32_t apiMask) { |
| 214 |
UNRECOVERABLE_IF(true); |
| 215 |
return CC_ERROR_NOT_SUPPORTED; |
| 216 |
} |
| 217 |
|
| 218 |
TCompletionCode IMetricSet_1_1::CalculateMetrics(const unsigned char *rawData, uint32_t rawDataSize, TTypedValue_1_0 *out, |
| 219 |
uint32_t outSize, uint32_t *outReportCount, bool enableContextFiltering) { |
| 220 |
UNRECOVERABLE_IF(true); |
| 221 |
return CC_ERROR_NOT_SUPPORTED; |
| 222 |
} |
| 223 |
|
| 224 |
TCompletionCode IMetricSet_1_1::CalculateIoMeasurementInformation(TTypedValue_1_0 *out, uint32_t outSize) { |
| 225 |
UNRECOVERABLE_IF(true); |
| 226 |
return CC_ERROR_NOT_SUPPORTED; |
| 227 |
} |
| 228 |
|
| 229 |
IMetricSet_1_4 ::~IMetricSet_1_4() {} |
| 230 |
|
| 231 |
TMetricSetParams_1_4 *IMetricSet_1_4::GetParams(void) { |
| 232 |
UNRECOVERABLE_IF(true); |
| 233 |
return nullptr; |
| 234 |
} |
| 235 |
|
| 236 |
IMetricSet_1_5 *IMetricSet_1_5::GetComplementaryMetricSet(uint32_t index) { |
| 237 |
UNRECOVERABLE_IF(true); |
| 238 |
return nullptr; |
| 239 |
} |
| 240 |
|
| 241 |
TCompletionCode IMetricSet_1_5::CalculateMetrics(const unsigned char *rawData, uint32_t rawDataSize, TTypedValue_1_0 *out, |
| 242 |
uint32_t outSize, uint32_t *outReportCount, TTypedValue_1_0 *outMaxValues, uint32_t outMaxValuesSize) { |
| 243 |
UNRECOVERABLE_IF(true); |
| 244 |
return CC_ERROR_NOT_SUPPORTED; |
| 245 |
} |
| 246 |
|
| 247 |
IMetric_1_0 ::~IMetric_1_0() {} |
| 248 |
|
| 249 |
TMetricParams_1_0 *IMetric_1_0::GetParams() { |
| 250 |
UNRECOVERABLE_IF(true); |
| 251 |
return nullptr; |
| 252 |
} |
| 253 |
|
| 254 |
IInformation_1_0 ::~IInformation_1_0() {} |
| 255 |
|
| 256 |
TInformationParams_1_0 *IInformation_1_0::GetParams() { |
| 257 |
UNRECOVERABLE_IF(true); |
| 258 |
return nullptr; |
| 259 |
} |
| 260 |
|
| 261 |
IAdapter_1_8 *IAdapterGroup_1_8::GetAdapter(uint32_t index) { |
| 262 |
UNRECOVERABLE_IF(true); |
| 263 |
return nullptr; |
| 264 |
} |
| 265 |
|
| 266 |
IAdapter_1_6 *IAdapterGroup_1_6::GetAdapter(uint32_t index) { |
| 267 |
UNRECOVERABLE_IF(true); |
| 268 |
return nullptr; |
| 269 |
} |
| 270 |
|
| 271 |
IEquation_1_0::~IEquation_1_0() {} |
| 272 |
uint32_t IEquation_1_0::GetEquationElementsCount(void) { |
| 273 |
UNRECOVERABLE_IF(true); |
| 274 |
return 0; |
| 275 |
} |
| 276 |
|
| 277 |
TEquationElement_1_0 *IEquation_1_0::GetEquationElement(uint32_t index) { |
| 278 |
UNRECOVERABLE_IF(true); |
| 279 |
return nullptr; |
| 280 |
} |
| 281 |
|
| 282 |
IAdapterGroup_1_6 ::~IAdapterGroup_1_6() { |
| 283 |
} |
| 284 |
|
| 285 |
const TAdapterGroupParams_1_6 *IAdapterGroup_1_6::GetParams(void) const { |
| 286 |
UNRECOVERABLE_IF(true); |
| 287 |
return nullptr; |
| 288 |
} |
| 289 |
|
| 290 |
IAdapter_1_9 *IAdapterGroup_1_9::GetAdapter(uint32_t index) { |
| 291 |
UNRECOVERABLE_IF(true); |
| 292 |
return nullptr; |
| 293 |
} |
| 294 |
|
| 295 |
TCompletionCode IAdapterGroup_1_6::Close() { |
| 296 |
UNRECOVERABLE_IF(true); |
| 297 |
return CC_ERROR_NOT_SUPPORTED; |
| 298 |
} |
| 299 |
|
| 300 |
IAdapter_1_6 ::~IAdapter_1_6() {} |
| 301 |
|
| 302 |
const TAdapterParams_1_6 *IAdapter_1_6 ::GetParams(void) const { |
| 303 |
UNRECOVERABLE_IF(true); |
| 304 |
return nullptr; |
| 305 |
} |
| 306 |
|
| 307 |
const TAdapterParams_1_8 *IAdapter_1_8::GetParams(void) const { |
| 308 |
UNRECOVERABLE_IF(true); |
| 309 |
return nullptr; |
| 310 |
} |
| 311 |
|
| 312 |
const TAdapterParams_1_9 *IAdapter_1_9::GetParams(void) const { |
| 313 |
UNRECOVERABLE_IF(true); |
| 314 |
return nullptr; |
| 315 |
} |
| 316 |
|
| 317 |
TCompletionCode IAdapter_1_6 ::Reset() { |
| 318 |
UNRECOVERABLE_IF(true); |
| 319 |
return CC_ERROR_NOT_SUPPORTED; |
| 320 |
} |
| 321 |
|
| 322 |
TCompletionCode IAdapter_1_6 ::OpenMetricsDevice(IMetricsDevice_1_5 **metricsDevice) { |
| 323 |
UNRECOVERABLE_IF(true); |
| 324 |
return CC_ERROR_NOT_SUPPORTED; |
| 325 |
} |
| 326 |
|
| 327 |
TCompletionCode IAdapter_1_6 ::OpenMetricsDeviceFromFile(const char *fileName, void *openParams, IMetricsDevice_1_5 **metricsDevice) { |
| 328 |
UNRECOVERABLE_IF(true); |
| 329 |
return CC_ERROR_NOT_SUPPORTED; |
| 330 |
} |
| 331 |
|
| 332 |
TCompletionCode IAdapter_1_6 ::CloseMetricsDevice(IMetricsDevice_1_5 *metricsDevice) { |
| 333 |
UNRECOVERABLE_IF(true); |
| 334 |
return CC_ERROR_NOT_SUPPORTED; |
| 335 |
} |
| 336 |
|
| 337 |
TCompletionCode IAdapter_1_6 ::SaveMetricsDeviceToFile(const char *fileName, void *saveParams, IMetricsDevice_1_5 *metricsDevice) { |
| 338 |
UNRECOVERABLE_IF(true); |
| 339 |
return CC_ERROR_NOT_SUPPORTED; |
| 340 |
} |
| 341 |
|
| 342 |
const TSubDeviceParams_1_9 *IAdapter_1_9::GetSubDeviceParams(const uint32_t subDeviceIndex) { |
| 343 |
UNRECOVERABLE_IF(true); |
| 344 |
return nullptr; |
| 345 |
} |
| 346 |
|
| 347 |
const TEngineParams_1_9 *IAdapter_1_9::GetEngineParams(const uint32_t subDeviceIndex, const uint32_t engineIndex) { |
| 348 |
UNRECOVERABLE_IF(true); |
| 349 |
return nullptr; |
| 350 |
} |
| 351 |
|
| 352 |
TCompletionCode IAdapter_1_9::OpenMetricsSubDevice(const uint32_t subDeviceIndex, IMetricsDevice_1_5 **metricsDevice) { |
| 353 |
UNRECOVERABLE_IF(true); |
| 354 |
return CC_ERROR_NOT_SUPPORTED; |
| 355 |
} |
| 356 |
|
| 357 |
TCompletionCode IAdapter_1_9::OpenMetricsSubDeviceFromFile(const uint32_t subDeviceIndex, const char *fileName, void *openParams, IMetricsDevice_1_5 **metricsDevice) { |
| 358 |
UNRECOVERABLE_IF(true); |
| 359 |
return CC_ERROR_NOT_SUPPORTED; |
| 360 |
} |
| 361 |
|
| 362 |
IAdapter_1_10 *IAdapterGroup_1_10::GetAdapter(uint32_t index) { |
| 363 |
UNRECOVERABLE_IF(true); |
| 364 |
return nullptr; |
| 365 |
} |
| 366 |
|
| 367 |
IAdapter_1_11 *IAdapterGroup_1_11::GetAdapter(uint32_t index) { |
| 368 |
UNRECOVERABLE_IF(true); |
| 369 |
return nullptr; |
| 370 |
} |
| 371 |
|
| 372 |
IAdapter_1_13 *IAdapterGroup_1_13::GetAdapter(uint32_t index) { |
| 373 |
UNRECOVERABLE_IF(true); |
| 374 |
return nullptr; |
| 375 |
} |
| 376 |
|
| 377 |
TConcurrentGroupParams_1_13 *IConcurrentGroup_1_13::GetParams(void) { |
| 378 |
UNRECOVERABLE_IF(true); |
| 379 |
return nullptr; |
| 380 |
} |
| 381 |
|
| 382 |
IMetricSet_1_13 *IConcurrentGroup_1_13::GetMetricSet(uint32_t index) { |
| 383 |
UNRECOVERABLE_IF(true); |
| 384 |
return nullptr; |
| 385 |
} |
| 386 |
|
| 387 |
IMetricEnumerator_1_13 *IConcurrentGroup_1_13::GetMetricEnumerator(void) { |
| 388 |
UNRECOVERABLE_IF(true); |
| 389 |
return nullptr; |
| 390 |
} |
| 391 |
IMetricEnumerator_1_13 *IConcurrentGroup_1_13::GetMetricEnumeratorFromFile(const char *fileName) { |
| 392 |
UNRECOVERABLE_IF(true); |
| 393 |
return nullptr; |
| 394 |
} |
| 395 |
IMetricSet_1_13 *IConcurrentGroup_1_13::AddMetricSet(const char *symbolName, const char *shortName) { |
| 396 |
UNRECOVERABLE_IF(true); |
| 397 |
return nullptr; |
| 398 |
} |
| 399 |
TCompletionCode IConcurrentGroup_1_13::RemoveMetricSet(IMetricSet_1_13 *metricSet) { |
| 400 |
UNRECOVERABLE_IF(true); |
| 401 |
return CC_ERROR_NOT_SUPPORTED; |
| 402 |
} |
| 403 |
|
| 404 |
IMetricSet_1_11 *IConcurrentGroup_1_11::GetMetricSet(uint32_t index) { |
| 405 |
UNRECOVERABLE_IF(true); |
| 406 |
return nullptr; |
| 407 |
} |
| 408 |
|
| 409 |
IMetricEnumerator_1_13::~IMetricEnumerator_1_13() {} |
| 410 |
uint32_t IMetricEnumerator_1_13::GetMetricPrototypeCount(void) { |
| 411 |
UNRECOVERABLE_IF(true); |
| 412 |
return 0; |
| 413 |
} |
| 414 |
|
| 415 |
IMetricPrototype_1_13 *IMetricEnumerator_1_13::GetMetricPrototype(const uint32_t index) { |
| 416 |
UNRECOVERABLE_IF(true); |
| 417 |
return nullptr; |
| 418 |
} |
| 419 |
|
| 420 |
TCompletionCode IMetricEnumerator_1_13::GetMetricPrototypes(const uint32_t index, uint32_t *count, IMetricPrototype_1_13 **metrics) { |
| 421 |
UNRECOVERABLE_IF(true); |
| 422 |
return CC_ERROR_NOT_SUPPORTED; |
| 423 |
} |
| 424 |
|
| 425 |
TCompletionCode IMetricEnumerator_1_13::RemoveClonedMetricPrototype(IMetricPrototype_1_13 *clonedPrototype) { |
| 426 |
UNRECOVERABLE_IF(true); |
| 427 |
return CC_ERROR_NOT_SUPPORTED; |
| 428 |
} |
| 429 |
|
| 430 |
IMetricPrototype_1_13::~IMetricPrototype_1_13() {} |
| 431 |
|
| 432 |
const TMetricPrototypeParams_1_13 *IMetricPrototype_1_13::GetParams(void) const { |
| 433 |
UNRECOVERABLE_IF(true); |
| 434 |
return nullptr; |
| 435 |
} |
| 436 |
IMetricPrototype_1_13 *IMetricPrototype_1_13::Clone(void) { |
| 437 |
UNRECOVERABLE_IF(true); |
| 438 |
return nullptr; |
| 439 |
} |
| 440 |
const TMetricPrototypeOptionDescriptor_1_13 *IMetricPrototype_1_13::GetOptionDescriptor(uint32_t index) const { |
| 441 |
UNRECOVERABLE_IF(true); |
| 442 |
return nullptr; |
| 443 |
} |
| 444 |
|
| 445 |
TCompletionCode IMetricPrototype_1_13::SetOption(const TOptionDescriptorType optionType, const TTypedValue_1_0 *typedValue) { |
| 446 |
UNRECOVERABLE_IF(true); |
| 447 |
return CC_ERROR_NOT_SUPPORTED; |
| 448 |
} |
| 449 |
TCompletionCode IMetricPrototype_1_13::ChangeNames(const char *symbolName, const char *shortName, const char *longName, const char *resultUnits) { |
| 450 |
UNRECOVERABLE_IF(true); |
| 451 |
return CC_ERROR_NOT_SUPPORTED; |
| 452 |
} |
| 453 |
|
| 454 |
IConcurrentGroup_1_11 *IMetricsDevice_1_11::GetConcurrentGroup(uint32_t index) { |
| 455 |
UNRECOVERABLE_IF(true); |
| 456 |
return nullptr; |
| 457 |
} |
| 458 |
|
| 459 |
TCompletionCode IMetricsDevice_1_10::GetGpuCpuTimestamps(uint64_t *gpuTimestampNs, uint64_t *cpuTimestampNs, uint32_t *cpuId, uint64_t *correlationIndicatorNs) { |
| 460 |
UNRECOVERABLE_IF(true); |
| 461 |
return CC_ERROR_NOT_SUPPORTED; |
| 462 |
} |
| 463 |
|
| 464 |
IConcurrentGroup_1_13 *IMetricsDevice_1_13::GetConcurrentGroup(uint32_t index) { |
| 465 |
UNRECOVERABLE_IF(true); |
| 466 |
return nullptr; |
| 467 |
} |
| 468 |
|
| 469 |
TCompletionCode IAdapter_1_10::OpenMetricsDevice(IMetricsDevice_1_10 **metricsDevice) { |
| 470 |
UNRECOVERABLE_IF(true); |
| 471 |
return CC_ERROR_NOT_SUPPORTED; |
| 472 |
} |
| 473 |
TCompletionCode IAdapter_1_10::OpenMetricsDeviceFromFile(const char *fileName, void *openParams, IMetricsDevice_1_10 **metricsDevice) { |
| 474 |
UNRECOVERABLE_IF(true); |
| 475 |
return CC_ERROR_NOT_SUPPORTED; |
| 476 |
} |
| 477 |
TCompletionCode IAdapter_1_10::OpenMetricsSubDevice(const uint32_t subDeviceIndex, IMetricsDevice_1_10 **metricsDevice) { |
| 478 |
UNRECOVERABLE_IF(true); |
| 479 |
return CC_ERROR_NOT_SUPPORTED; |
| 480 |
} |
| 481 |
TCompletionCode IAdapter_1_10::OpenMetricsSubDeviceFromFile(const uint32_t subDeviceIndex, const char *fileName, void *openParams, IMetricsDevice_1_10 **metricsDevice) { |
| 482 |
UNRECOVERABLE_IF(true); |
| 483 |
return CC_ERROR_NOT_SUPPORTED; |
| 484 |
} |
| 485 |
|
| 486 |
TCompletionCode IAdapter_1_11::OpenMetricsDevice(IMetricsDevice_1_11 **metricsDevice) { |
| 487 |
UNRECOVERABLE_IF(true); |
| 488 |
return CC_ERROR_NOT_SUPPORTED; |
| 489 |
} |
| 490 |
TCompletionCode IAdapter_1_11::OpenMetricsDeviceFromFile(const char *fileName, void *openParams, IMetricsDevice_1_11 **metricsDevice) { |
| 491 |
UNRECOVERABLE_IF(true); |
| 492 |
return CC_ERROR_NOT_SUPPORTED; |
| 493 |
} |
| 494 |
TCompletionCode IAdapter_1_11::OpenMetricsSubDevice(const uint32_t subDeviceIndex, IMetricsDevice_1_11 **metricsDevice) { |
| 495 |
UNRECOVERABLE_IF(true); |
| 496 |
return CC_ERROR_NOT_SUPPORTED; |
| 497 |
} |
| 498 |
TCompletionCode IAdapter_1_11::OpenMetricsSubDeviceFromFile(const uint32_t subDeviceIndex, const char *fileName, void *openParams, IMetricsDevice_1_11 **metricsDevice) { |
| 499 |
UNRECOVERABLE_IF(true); |
| 500 |
return CC_ERROR_NOT_SUPPORTED; |
| 501 |
} |
| 502 |
TCompletionCode IAdapter_1_11::SaveMetricsDeviceToFile(const char *fileName, void *saveParams, IMetricsDevice_1_11 *metricsDevice, const uint32_t minMajorApiVersion, const uint32_t minMinorApiVersion) { |
| 503 |
UNRECOVERABLE_IF(true); |
| 504 |
return CC_ERROR_NOT_SUPPORTED; |
| 505 |
} |
| 506 |
|
| 507 |
TCompletionCode IAdapter_1_13::OpenMetricsDevice(IMetricsDevice_1_13 **metricsDevice) { |
| 508 |
UNRECOVERABLE_IF(true); |
| 509 |
return CC_ERROR_NOT_SUPPORTED; |
| 510 |
} |
| 511 |
|
| 512 |
TCompletionCode IAdapter_1_13::OpenMetricsDeviceFromFile(const char *fileName, void *openParams, IMetricsDevice_1_13 **metricsDevice) { |
| 513 |
UNRECOVERABLE_IF(true); |
| 514 |
return CC_ERROR_NOT_SUPPORTED; |
| 515 |
} |
| 516 |
TCompletionCode IAdapter_1_13::OpenMetricsSubDevice(const uint32_t subDeviceIndex, IMetricsDevice_1_13 **metricsDevice) { |
| 517 |
UNRECOVERABLE_IF(true); |
| 518 |
return CC_ERROR_NOT_SUPPORTED; |
| 519 |
} |
| 520 |
TCompletionCode IAdapter_1_13::OpenMetricsSubDeviceFromFile(const uint32_t subDeviceIndex, const char *fileName, void *openParams, IMetricsDevice_1_13 **metricsDevice) { |
| 521 |
UNRECOVERABLE_IF(true); |
| 522 |
return CC_ERROR_NOT_SUPPORTED; |
| 523 |
} |
| 524 |
|
| 525 |
const TEngineParams_1_13 *IAdapter_1_13::GetEngineParams(const uint32_t subDeviceIndex, const uint32_t engineIndex) { |
| 526 |
UNRECOVERABLE_IF(true); |
| 527 |
return nullptr; |
| 528 |
} |
| 529 |
|
| 530 |
IMetricSet_1_11::~IMetricSet_1_11() { |
| 531 |
} |
| 532 |
TMetricSetParams_1_11 *IMetricSet_1_11::GetParams(void) { |
| 533 |
UNRECOVERABLE_IF(true); |
| 534 |
return nullptr; |
| 535 |
} |
| 536 |
|
| 537 |
IMetricSet_1_13::~IMetricSet_1_13() { |
| 538 |
} |
| 539 |
TCompletionCode IMetricSet_1_13::Open() { |
| 540 |
UNRECOVERABLE_IF(true); |
| 541 |
return CC_ERROR_NOT_SUPPORTED; |
| 542 |
} |
| 543 |
TCompletionCode IMetricSet_1_13::AddMetric(IMetricPrototype_1_13 *metricPrototype) { |
| 544 |
UNRECOVERABLE_IF(true); |
| 545 |
return CC_ERROR_NOT_SUPPORTED; |
| 546 |
} |
| 547 |
TCompletionCode IMetricSet_1_13::RemoveMetric(IMetricPrototype_1_13 *metricPrototype) { |
| 548 |
UNRECOVERABLE_IF(true); |
| 549 |
return CC_ERROR_NOT_SUPPORTED; |
| 550 |
} |
| 551 |
TCompletionCode IMetricSet_1_13::Finalize() { |
| 552 |
UNRECOVERABLE_IF(true); |
| 553 |
return CC_ERROR_NOT_SUPPORTED; |
| 554 |
} |
| 555 |
|
| 556 |
IMetric_1_13 *IMetricSet_1_13::AddCustomMetric( |
| 557 |
const char *symbolName, |
| 558 |
const char *shortName, |
| 559 |
const char *groupName, |
| 560 |
const char *longName, |
| 561 |
const char *dxToOglAlias, |
| 562 |
uint32_t usageFlagsMask, |
| 563 |
uint32_t apiMask, |
| 564 |
TMetricResultType resultType, |
| 565 |
const char *resultUnits, |
| 566 |
TMetricType metricType, |
| 567 |
int64_t loWatermark, |
| 568 |
int64_t hiWatermark, |
| 569 |
THwUnitType hwType, |
| 570 |
const char *ioReadEquation, |
| 571 |
const char *deltaFunction, |
| 572 |
const char *queryReadEquation, |
| 573 |
const char *normalizationEquation, |
| 574 |
const char *maxValueEquation, |
| 575 |
const char *signalName, |
| 576 |
uint32_t queryModeMask) { |
| 577 |
UNRECOVERABLE_IF(true); |
| 578 |
return nullptr; |
| 579 |
} |
| 580 |
|
| 581 |
IMetric_1_13 *IMetricSet_1_13::GetMetric(uint32_t index) { |
| 582 |
UNRECOVERABLE_IF(true); |
| 583 |
return nullptr; |
| 584 |
} |
| 585 |
|
| 586 |
IMetric_1_13::~IMetric_1_13() {} |
| 587 |
|
| 588 |
TMetricParams_1_13 *IMetric_1_13::GetParams() { |
| 589 |
UNRECOVERABLE_IF(true); |
| 590 |
return nullptr; |
| 591 |
} |
| 592 |
|
| 593 |
} // namespace MetricsDiscovery |