mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 12:23:05 +08:00
Generate Offline Dump Context ID
On linux OfflineDumpContextId consists of 32b processId in bits 63:32 32b drmContestId in bits 31:0 Also cache linux implementation of getProcessId since the value is constant. Related-To: NEO-7630 Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
53fe4de534
commit
fd971f7a61
@@ -17,6 +17,7 @@
|
||||
#include "shared/source/os_interface/os_context.h"
|
||||
#include "shared/source/os_interface/os_interface.h"
|
||||
#include "shared/source/os_interface/product_helper.h"
|
||||
#include "shared/source/os_interface/sys_calls_common.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
@@ -94,6 +95,16 @@ void OsContextLinux::waitForPagingFence() {
|
||||
|
||||
void OsContextLinux::reInitializeContext() {}
|
||||
|
||||
uint64_t OsContextLinux::getOfflineDumpContextId(uint32_t deviceIndex) const {
|
||||
if (deviceIndex < drmContextIds.size()) {
|
||||
const auto processId = SysCalls::getProcessId();
|
||||
const auto drmContextId = drmContextIds[deviceIndex];
|
||||
return static_cast<uint64_t>(processId) << 32 |
|
||||
static_cast<uint64_t>(drmContextId);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
OsContextLinux::~OsContextLinux() {
|
||||
if (contextInitialized) {
|
||||
for (auto drmContextId : drmContextIds) {
|
||||
|
||||
Reference in New Issue
Block a user