mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-29 09:03:14 +08:00
feature: Enable EuStall Metrics with xeKMD
Related-To: NEO-9645 Signed-off-by: Neil R. Spruit <neil.r.spruit@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
fe6809ac04
commit
960664f352
@@ -12,6 +12,7 @@ set(NEO_CORE_OS_INTERFACE_LINUX_XE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ioctl_helper_xe.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}/ioctl_helper_xe_query_hw_ip_version.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}/ioctl_helper_xe_vm_bind_flags.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}/ioctl_helper_xe_perf.cpp
|
||||
)
|
||||
|
||||
if(NEO_ENABLE_XE_EU_DEBUG_SUPPORT)
|
||||
|
||||
@@ -1138,6 +1138,9 @@ int IoctlHelperXe::ioctl(DrmIoctl request, void *arg) {
|
||||
case DrmIoctl::metadataDestroy: {
|
||||
ret = debuggerMetadataDestroyIoctl(request, arg);
|
||||
} break;
|
||||
case DrmIoctl::perfOpen: {
|
||||
ret = perfOpenIoctl(request, arg);
|
||||
} break;
|
||||
|
||||
default:
|
||||
xeLog("Not handled 0x%x\n", request);
|
||||
@@ -1500,18 +1503,6 @@ void IoctlHelperXe::setContextProperties(const OsContextLinux &osContext, void *
|
||||
}
|
||||
}
|
||||
|
||||
bool IoctlHelperXe::perfOpenEuStallStream(uint32_t euStallFdParameter, std::array<uint64_t, 12u> &properties, int32_t *stream) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool IoctlHelperXe::perfDisableEuStallStream(int32_t *stream) {
|
||||
return false;
|
||||
}
|
||||
bool IoctlHelperXe::getEuStallProperties(std::array<uint64_t, 12u> &properties, uint64_t dssBufferSize, uint64_t samplingRate,
|
||||
uint64_t pollPeriod, uint64_t engineInstance, uint64_t notifyNReports) {
|
||||
return false;
|
||||
}
|
||||
|
||||
unsigned int IoctlHelperXe::getIoctlRequestValue(DrmIoctl ioctlRequest) const {
|
||||
xeLog(" -> IoctlHelperXe::%s 0x%x\n", __FUNCTION__, ioctlRequest);
|
||||
switch (ioctlRequest) {
|
||||
@@ -1547,12 +1538,20 @@ unsigned int IoctlHelperXe::getIoctlRequestValue(DrmIoctl ioctlRequest) const {
|
||||
case DrmIoctl::metadataCreate:
|
||||
case DrmIoctl::metadataDestroy:
|
||||
return getIoctlRequestValueDebugger(ioctlRequest);
|
||||
case DrmIoctl::perfOpen:
|
||||
case DrmIoctl::perfEnable:
|
||||
case DrmIoctl::perfDisable:
|
||||
return getIoctlRequestValuePerf(ioctlRequest);
|
||||
default:
|
||||
UNRECOVERABLE_IF(true);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
int IoctlHelperXe::ioctl(int fd, DrmIoctl request, void *arg) {
|
||||
return NEO::SysCalls::ioctl(fd, getIoctlRequestValue(request), arg);
|
||||
}
|
||||
|
||||
std::string IoctlHelperXe::getIoctlString(DrmIoctl ioctlRequest) const {
|
||||
switch (ioctlRequest) {
|
||||
case DrmIoctl::gemClose:
|
||||
|
||||
@@ -36,7 +36,7 @@ class IoctlHelperXe : public IoctlHelper {
|
||||
IoctlHelperXe(Drm &drmArg);
|
||||
~IoctlHelperXe() override;
|
||||
int ioctl(DrmIoctl request, void *arg) override;
|
||||
|
||||
int ioctl(int fd, DrmIoctl request, void *arg) override;
|
||||
bool initialize() override;
|
||||
bool isSetPairAvailable() override;
|
||||
bool isChunkingAvailable() override;
|
||||
@@ -84,6 +84,8 @@ class IoctlHelperXe : public IoctlHelper {
|
||||
uint32_t getEuStallFdParameter() override;
|
||||
bool perfOpenEuStallStream(uint32_t euStallFdParameter, std::array<uint64_t, 12u> &properties, int32_t *stream) override;
|
||||
bool perfDisableEuStallStream(int32_t *stream) override;
|
||||
MOCKABLE_VIRTUAL int perfOpenIoctl(DrmIoctl request, void *arg);
|
||||
unsigned int getIoctlRequestValuePerf(DrmIoctl ioctlRequest) const;
|
||||
UuidRegisterResult registerUuid(const std::string &uuid, uint32_t uuidClass, uint64_t ptr, uint64_t size) override;
|
||||
UuidRegisterResult registerStringClassUuid(const std::string &uuid, uint64_t ptr, uint64_t size) override;
|
||||
int unregisterUuid(uint32_t handle) override;
|
||||
|
||||
35
shared/source/os_interface/linux/xe/ioctl_helper_xe_perf.cpp
Normal file
35
shared/source/os_interface/linux/xe/ioctl_helper_xe_perf.cpp
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/os_interface/linux/sys_calls.h"
|
||||
#include "shared/source/os_interface/linux/xe/ioctl_helper_xe.h"
|
||||
|
||||
#include "xe_drm.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
bool IoctlHelperXe::perfOpenEuStallStream(uint32_t euStallFdParameter, std::array<uint64_t, 12u> &properties, int32_t *stream) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool IoctlHelperXe::perfDisableEuStallStream(int32_t *stream) {
|
||||
return false;
|
||||
}
|
||||
bool IoctlHelperXe::getEuStallProperties(std::array<uint64_t, 12u> &properties, uint64_t dssBufferSize, uint64_t samplingRate,
|
||||
uint64_t pollPeriod, uint64_t engineInstance, uint64_t notifyNReports) {
|
||||
return false;
|
||||
}
|
||||
|
||||
unsigned int IoctlHelperXe::getIoctlRequestValuePerf(DrmIoctl ioctlRequest) const {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int IoctlHelperXe::perfOpenIoctl(DrmIoctl request, void *arg) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
Reference in New Issue
Block a user