Files
compute-runtime/shared/test/common/mocks/mock_os_context.h
Mateusz Hoppe c43b827702 feature(debugger): allocate per-context SIP kernels with contextID
- optimize allocating SIP kernels for context - use cached binary
- parse SIP binary to find patch location
- patch SIP binary with Offline dump context id

Related-To: NEO-7630

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2023-08-09 16:22:20 +02:00

42 lines
1.3 KiB
C++

/*
* Copyright (C) 2019-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/os_interface/os_context.h"
namespace NEO {
class MockOsContext : public OsContext {
public:
using OsContext::checkDirectSubmissionSupportsEngine;
using OsContext::contextInitialized;
using OsContext::debuggableContext;
using OsContext::engineType;
using OsContext::engineUsage;
using OsContext::getDeviceBitfield;
MockOsContext(uint32_t contextId, const EngineDescriptor &engineDescriptorHelper)
: OsContext(0, contextId, engineDescriptorHelper) {}
};
static_assert(sizeof(OsContext) == sizeof(MockOsContext));
class OsContextMock : public OsContext {
public:
using OsContext::checkDirectSubmissionSupportsEngine;
using OsContext::contextInitialized;
using OsContext::debuggableContext;
using OsContext::engineType;
using OsContext::engineUsage;
using OsContext::getDeviceBitfield;
OsContextMock(uint32_t contextId, const EngineDescriptor &engineDescriptorHelper)
: OsContext(0, contextId, engineDescriptorHelper) {}
uint64_t getOfflineDumpContextId(uint32_t deviceIndex) const override { return offlineDumpCtxId; };
uint64_t offlineDumpCtxId = 0;
};
} // namespace NEO