atomic cas use prefetchw if available
remove useless memorybarrier remove double membarrier in wait pm4 cmd add int64 cvar use int64 cvar for x64 feature mask Rework some functions that were frontend bound according to vtune placing some of their code in different noinline functions, profiling after indicating l1 cache misses decreased and perf of func increased remove long vpinsrd dep chain code for conversion.h, instead do normal load+bswap or movbe if avail Much faster entry table via split_map, code size could be improved though GetResolveInfo was very large and had impact on icache, mark callees as noinline + msvc pragma optimize small use log2 shifts instead of integer divides in memory minor optimizations in PhysicalHeap::EnableAccessCallbacks, the majority of time in the function is spent looping, NOT calling Protect! Someone should optimize this function and rework the algo completely remove wonky scheduling log message, it was spammy and unhelpful lock count was unnecessary for criticalsection mutex, criticalsection is already a recursive mutex brief notes i gotta run
This commit is contained in:
@@ -39,6 +39,8 @@ XE_NTDLL_IMPORT(NtWaitForSingleObject, cls_NtWaitForSingleObject,
|
||||
NtWaitForSingleObjectPointer);
|
||||
|
||||
XE_NTDLL_IMPORT(NtSetEvent, cls_NtSetEvent, NtSetEventPointer);
|
||||
XE_NTDLL_IMPORT(NtSetEventBoostPriority, cls_NtSetEventBoostPriority,
|
||||
NtSetEventBoostPriorityPointer);
|
||||
// difference between NtClearEvent and NtResetEvent is that NtResetEvent returns
|
||||
// the events state prior to the call, but we dont need that. might need to
|
||||
// check whether one or the other is faster in the kernel though yeah, just
|
||||
@@ -53,6 +55,7 @@ XE_NTDLL_IMPORT(NtReleaseSemaphore, cls_NtReleaseSemaphore,
|
||||
|
||||
XE_NTDLL_IMPORT(NtDelayExecution, cls_NtDelayExecution,
|
||||
NtDelayExecutionPointer);
|
||||
|
||||
namespace xe {
|
||||
namespace threading {
|
||||
|
||||
@@ -137,7 +140,7 @@ void MaybeYield() {
|
||||
#endif
|
||||
#endif
|
||||
// memorybarrier is really not necessary here...
|
||||
MemoryBarrier();
|
||||
// MemoryBarrier();
|
||||
}
|
||||
|
||||
void SyncMemory() { MemoryBarrier(); }
|
||||
@@ -288,11 +291,19 @@ class Win32Event : public Win32Handle<Event> {
|
||||
void Set() override { NtSetEventPointer.invoke(handle_, nullptr); }
|
||||
void Reset() override { NtClearEventPointer.invoke(handle_); }
|
||||
void Pulse() override { NtPulseEventPointer.invoke(handle_, nullptr); }
|
||||
void SetBoostPriority() override {
|
||||
// no previous state for boostpriority
|
||||
NtSetEventBoostPriorityPointer.invoke(handle_);
|
||||
}
|
||||
#else
|
||||
void Set() override { SetEvent(handle_); }
|
||||
void Reset() override { ResetEvent(handle_); }
|
||||
void Pulse() override { PulseEvent(handle_); }
|
||||
|
||||
void SetBoostPriority() override {
|
||||
// no win32 version of boostpriority
|
||||
SetEvent(handle_);
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user