Remove redundant tracking lock checks from the hot path

This commit is contained in:
nmzik
2026-10-02 12:55:47 +04:00
parent d1c99bbfb0
commit a67a033ff8
2 changed files with 13 additions and 10 deletions
+11 -1
View File
@@ -871,6 +871,15 @@ void TestFullRegionGpuUnmarkBatching() {
[&]() noexcept {
(void)tracker.IsRegionCpuModified(address, page_size);
});
} else if (std::strcmp(name, "recursive-tracking-lock") == 0) {
Libs::Graphics::TrackingSpinLock lock;
lock.lock();
lock.lock();
} else if (std::strcmp(name, "non-owner-tracking-unlock") == 0) {
Libs::Graphics::TrackingSpinLock lock;
lock.lock();
std::thread worker([&] { lock.unlock(); });
worker.join();
}
std::_Exit(0x7f);
}
@@ -928,7 +937,8 @@ void CheckDeathCase(const char *name) {
}
void TestFatalPaths() {
for (const char *name : {"gpu-dirty-explicit-cpu", "reentrant-upload"}) {
for (const char *name : {"gpu-dirty-explicit-cpu", "reentrant-upload",
"recursive-tracking-lock", "non-owner-tracking-unlock"}) {
CheckDeathCase(name);
}
}