Refactor ult for preemption enabling

Refactoring in ULTs around preemption:
    -refactoring ULTS to not fail with default preemption mode
    -fixing ULT memory leaks observed after enabling preemption
    -mocking getSipKernel in ULTs (to minimize ULT execution time)

Change-Id: I194b56173d7cb23aae94eeeca60051759c817e10
This commit is contained in:
mplewka
2018-03-05 09:25:40 +01:00
committed by sys_ocldev
parent 37b0d07f8a
commit 079f94cd2d
29 changed files with 474 additions and 158 deletions

View File

@ -26,6 +26,7 @@
#include "runtime/helpers/preamble.h"
#include "unit_tests/preamble/preamble_fixture.h"
#include "unit_tests/gen_common/gen_cmd_parse.h"
#include "unit_tests/helpers/debug_manager_state_restore.h"
using namespace OCLRT;
@ -75,6 +76,8 @@ SKLTEST_F(Gen9L3Config, checkSLM) {
typedef PreambleFixture ThreadArbitration;
SKLTEST_F(ThreadArbitration, givenPreambleWhenItIsProgrammedThenThreadArbitrationIsSetToRoundRobin) {
DebugManagerStateRestore dbgRestore;
DebugManager.flags.ForcePreemptionMode.set(static_cast<int32_t>(PreemptionMode::Disabled));
typedef SKLFamily::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM;
typedef SKLFamily::PIPE_CONTROL PIPE_CONTROL;
LinearStream &cs = linearStream;