mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 14:02:58 +08:00
performance: add windows thread priority debug key
Set windows thread priority to "above normal" on wddm init if flag is set. Related-To: NEO-8215 Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
9b0c64abef
commit
997bdfa010
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
* Copyright (C) 2018-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -96,6 +96,9 @@ DWORD setFilePointerResult = 0;
|
||||
size_t setProcessPowerThrottlingStateCalled = 0u;
|
||||
ProcessPowerThrottlingState setProcessPowerThrottlingStateLastValue{};
|
||||
|
||||
size_t setThreadPriorityCalled = 0u;
|
||||
ThreadPriority setThreadPriorityLastValue{};
|
||||
|
||||
bool pathExists(const std::string &path) {
|
||||
std::string tempP1 = path;
|
||||
if (!path.empty() && path.back() == PATH_SEPARATOR) {
|
||||
@@ -281,6 +284,11 @@ void setProcessPowerThrottlingState(ProcessPowerThrottlingState state) {
|
||||
setProcessPowerThrottlingStateLastValue = state;
|
||||
}
|
||||
|
||||
void setThreadPriority(ThreadPriority priority) {
|
||||
setThreadPriorityCalled++;
|
||||
setThreadPriorityLastValue = priority;
|
||||
}
|
||||
|
||||
LSTATUS regOpenKeyExA(HKEY hKey, LPCSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult) {
|
||||
if (regOpenKeySuccessCount > 0) {
|
||||
regOpenKeySuccessCount--;
|
||||
|
||||
Reference in New Issue
Block a user