mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 23:56:39 +08:00
Metric Refactor Metric Context
Rename Metric Context and move OA specific functions and members from Metric Context to OA specific class(MetricSource). This refactoring is done so that additional Metric Source like Stall Sampling could be Seamlessly implemented. Related-To: LOCI-2753 Signed-off-by: Joshua Santosh Ranjan <joshua.santosh.ranjan@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
27c90ac2d6
commit
f1c50a8c89
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2021 Intel Corporation
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "shared/source/os_interface/os_interface.h"
|
||||
|
||||
#include "level_zero/tools/source/metrics/metric_enumeration_imp.h"
|
||||
#include "level_zero/tools/source/metrics/metric_source_oa.h"
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <sys/sysmacros.h>
|
||||
@@ -20,7 +21,7 @@ const char *MetricEnumeration::getMetricsDiscoveryFilename() { return "libmd.so.
|
||||
|
||||
bool MetricEnumeration::getAdapterId(uint32_t &adapterMajor, uint32_t &adapterMinor) {
|
||||
|
||||
auto &device = metricContext.getDevice();
|
||||
auto &device = metricSource.getMetricDeviceContext().getDevice();
|
||||
auto &osInterface = device.getOsInterface();
|
||||
auto drm = osInterface.getDriverModel()->as<NEO::Drm>();
|
||||
auto drmFile = drm->getFileDescriptor();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2021 Intel Corporation
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
#include "level_zero/core/source/device/device.h"
|
||||
#include "level_zero/tools/source/metrics/metric_query_imp.h"
|
||||
#include "level_zero/tools/source/metrics/metric_source_oa.h"
|
||||
|
||||
using namespace MetricsLibraryApi;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user