mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-07 21:27:04 +08:00
Add debug key for aub file generation per process id
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
a955eac9c7
commit
0a41c42854
@@ -37,6 +37,7 @@ set(NEO_CORE_OS_INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/os_time.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/print.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/os_inc_base.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sys_calls_common.h
|
||||
)
|
||||
|
||||
if(SUPPORT_XEHP_PLUS)
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "shared/source/os_interface/sys_calls_common.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <poll.h>
|
||||
#include <sys/mman.h>
|
||||
|
||||
@@ -18,7 +18,13 @@
|
||||
#include <unistd.h>
|
||||
|
||||
namespace NEO {
|
||||
|
||||
namespace SysCalls {
|
||||
|
||||
unsigned int getProcessId() {
|
||||
return getpid();
|
||||
}
|
||||
|
||||
int close(int fileDescriptor) {
|
||||
return ::close(fileDescriptor);
|
||||
}
|
||||
|
||||
18
shared/source/os_interface/sys_calls_common.h
Normal file
18
shared/source/os_interface/sys_calls_common.h
Normal file
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace NEO {
|
||||
|
||||
namespace SysCalls {
|
||||
|
||||
unsigned int getProcessId();
|
||||
|
||||
} // namespace SysCalls
|
||||
|
||||
} // namespace NEO
|
||||
@@ -26,6 +26,10 @@ bool isShutdownInProgress() {
|
||||
|
||||
namespace SysCalls {
|
||||
|
||||
unsigned int getProcessId() {
|
||||
return GetCurrentProcessId();
|
||||
}
|
||||
|
||||
HANDLE createEvent(LPSECURITY_ATTRIBUTES lpEventAttributes, BOOL bManualReset, BOOL bInitialState, LPCSTR lpName) {
|
||||
return CreateEventA(lpEventAttributes, bManualReset, bInitialState, lpName);
|
||||
}
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2020 Intel Corporation
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "shared/source/os_interface/sys_calls_common.h"
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
namespace NEO {
|
||||
|
||||
Reference in New Issue
Block a user