mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 09:14:47 +08:00
Create structure UsageInfo for task count and residency task count
Change-Id: I0899c88d9e567a09ba46461ae69cf6c80f713e67 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
e599d1503b
commit
0e0a280803
@@ -227,13 +227,13 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCommandStreamReceiverWhenProcessResidenc
|
||||
auto graphicsAllocation = memoryManager->allocateGraphicsMemory(4096);
|
||||
ASSERT_NE(nullptr, graphicsAllocation);
|
||||
|
||||
EXPECT_EQ(ObjectNotResident, graphicsAllocation->residencyTaskCount[0u]);
|
||||
EXPECT_EQ(ObjectNotResident, graphicsAllocation->getResidencyTaskCount(0u));
|
||||
|
||||
ResidencyContainer allocationsForResidency = {graphicsAllocation};
|
||||
tbxCsr->processResidency(allocationsForResidency, *pDevice->getOsContext());
|
||||
|
||||
EXPECT_NE(ObjectNotResident, graphicsAllocation->residencyTaskCount[0u]);
|
||||
EXPECT_EQ((int)tbxCsr->peekTaskCount() + 1, graphicsAllocation->residencyTaskCount[0u]);
|
||||
EXPECT_NE(ObjectNotResident, graphicsAllocation->getResidencyTaskCount(0u));
|
||||
EXPECT_EQ((int)tbxCsr->peekTaskCount() + 1, graphicsAllocation->getResidencyTaskCount(0u));
|
||||
|
||||
memoryManager->freeGraphicsMemory(graphicsAllocation);
|
||||
}
|
||||
@@ -246,13 +246,13 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCommandStreamReceiverWhenProcessResidenc
|
||||
auto graphicsAllocation = memoryManager->allocateGraphicsMemory(4096);
|
||||
ASSERT_NE(nullptr, graphicsAllocation);
|
||||
|
||||
EXPECT_EQ(ObjectNotResident, graphicsAllocation->residencyTaskCount[0u]);
|
||||
EXPECT_EQ(ObjectNotResident, graphicsAllocation->getResidencyTaskCount(0u));
|
||||
|
||||
ResidencyContainer allocationsForResidency = {graphicsAllocation};
|
||||
tbxCsr->processResidency(allocationsForResidency, *pDevice->getOsContext());
|
||||
|
||||
EXPECT_NE(ObjectNotResident, graphicsAllocation->residencyTaskCount[0u]);
|
||||
EXPECT_EQ((int)tbxCsr->peekTaskCount() + 1, graphicsAllocation->residencyTaskCount[0u]);
|
||||
EXPECT_NE(ObjectNotResident, graphicsAllocation->getResidencyTaskCount(0u));
|
||||
EXPECT_EQ((int)tbxCsr->peekTaskCount() + 1, graphicsAllocation->getResidencyTaskCount(0u));
|
||||
|
||||
memoryManager->freeGraphicsMemory(graphicsAllocation);
|
||||
}
|
||||
@@ -273,12 +273,12 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCommandStreamReceiverWhenFlushIsCalledTh
|
||||
auto engineType = OCLRT::ENGINE_RCS;
|
||||
ResidencyContainer allocationsForResidency = {graphicsAllocation};
|
||||
|
||||
EXPECT_EQ(ObjectNotResident, graphicsAllocation->residencyTaskCount[0u]);
|
||||
EXPECT_EQ(ObjectNotResident, graphicsAllocation->getResidencyTaskCount(0u));
|
||||
|
||||
tbxCsr->flush(batchBuffer, engineType, allocationsForResidency, *pDevice->getOsContext());
|
||||
|
||||
EXPECT_NE(ObjectNotResident, graphicsAllocation->residencyTaskCount[0u]);
|
||||
EXPECT_EQ((int)tbxCsr->peekTaskCount() + 1, graphicsAllocation->residencyTaskCount[0u]);
|
||||
EXPECT_NE(ObjectNotResident, graphicsAllocation->getResidencyTaskCount(0u));
|
||||
EXPECT_EQ((int)tbxCsr->peekTaskCount() + 1, graphicsAllocation->getResidencyTaskCount(0u));
|
||||
|
||||
memoryManager->freeGraphicsMemory(commandBuffer);
|
||||
memoryManager->freeGraphicsMemory(graphicsAllocation);
|
||||
|
||||
Reference in New Issue
Block a user