Liam
05eda56e66
core_timing: handle concurrent unscheduling of looping events
2 years ago
Liam
575db04172
core_timing: use static typing for no-wait unschedule
2 years ago
Liam
f34d3d7e84
core_timing: remove user data value
2 years ago
Liam
ec6b67d862
core_timing: lock event queue access
2 years ago
Merry
f70bafff1a
core_timing: Attempt to reduce heap sifting
2 years ago
Merry
3ad7eec9de
core_timing: Use a fibonacci heap
2 years ago
Kelebek1
6f7cb69c94
Use spans over guest memory where possible instead of copying data.
3 years ago
Morph
c3fbc8d2fe
core_timing: Remove GetCurrentTimerResolution in CoreTiming loop
Other programs may change this value, but if thousands of syscalls in this loop is undesirable, then we can just set this once.
3 years ago
Morph
2e1e725443
core_timing: Fix SingleCore cycle timer
3 years ago
Morph
907507886d
(wall, native)_clock: Add GetGPUTick
Allows us to directly calculate the GPU tick without double conversion to and from the host clock tick.
3 years ago
Morph
8e56a84566
core_timing: Use CNTPCT as the guest CPU tick
Previously, we were mixing the raw CPU frequency and CNTFRQ.
The raw CPU frequency (1020 MHz) should've never been used as CNTPCT (whose frequency is CNTFRQ) is the only counter available.
3 years ago
Morph
e1bce50d8b
core_timing: Make use of MicroSleep for x64 CPUs
For CPUs that support tpause, this should result in significant CPU power savings over thread yield in this spin wait.
3 years ago
Morph
3053a62375
core: Promote CPU/GPU threads to time critical
And also demote Audren and CoreTiming to High thread priority.
3 years ago
Morph
bff1453282
core_timing: Use higher precision sleeps on Windows
The precision of sleep_for and wait_for is limited to 1-1.5ms on Windows.
Using SleepForOneTick() allows us to sleep for exactly one interval of the current timer resolution.
This allows us to take advantage of systems that have a timer resolution of 0.5ms to reduce CPU overhead in the event loop.
3 years ago
arades79
683019878f
remove static from pointer sized or smaller types for aesthetics, change constexpr static to static constexpr for consistency
Signed-off-by: arades79 <scravers@protonmail.com>
3 years ago
arades79
45e13b03f3
add static lifetime to constexpr values to force compile time evaluation where possible
Signed-off-by: arades79 <scravers@protonmail.com>
3 years ago
Liam
0953cdd271
timing: wait for completion on unregister
3 years ago
bunnei
638fa6170a
core: core_timing: Re-initialize if single/multicore state changes.
3 years ago
bunnei
a4d11f4427
core: Partially persist emulation state across game boots.
3 years ago
Liam
9632434243
core_timing: use high-precision sleeps on non-Windows targets
3 years ago
Liam
35d3e7db2a
common: remove "yuzu:" prefix from thread names
3 years ago
Kelebek1
e93e898df5
Remove pause callbacks from coretiming
3 years ago
Morph
606cdb17d3
core_timing: Sleep in discrete intervals, yield during spin
3 years ago
Kelebek1
658e1ee426
Add missing looping event schedule signal
3 years ago
Kelebek1
83a24ad638
Make coretiming waiting more accurate
3 years ago
Maide
2e46110379
Revert Coretiming PRs 8531 and 7454 ( #8591 )
3 years ago
Kelebek1
240650f6a6
Rework CoreTiming
4 years ago
Fernando Sahmkow
d3cb9201f1
Core timing: use only one thread.
4 years ago
Fernando Sahmkow
3196d957b0
Adress Feedback.
4 years ago
Fernando Sahmkow
86ccce3721
Address feedback.
4 years ago
Fernando Sahmkow
38e4a144a1
Core: Protect each event from race conditions within it.
4 years ago
Fernando Sahmkow
a2d29412cb
Core/Common: Corrections to core timing and add critical priority.
4 years ago
Fernando Sahmkow
846c994cc9
Core: Reimplement Core Timing.
4 years ago
Morph
99ceb03a1c
general: Convert source file copyright comments over to SPDX
This formats all copyright comments according to SPDX formatting guidelines.
Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
4 years ago
Lioncash
ebb64d5bf4
core: Resolve misc cases of variable shadowing
Resolves shadowing warnings that aren't in a particularly large
subsection of core. Brings us closer to turning -Wshadow into an error.
All that remains now is for cases in the kernel (left untouched for now
since a big change by bunnei is pending), and a few left over in the
service code (will be tackled next).
5 years ago
bunnei
82f6037ec2
core: hle: Add missing calls to MicroProfileOnThreadExit.
5 years ago
bunnei
3d592972dc
Revert "core: Fix clang build"
5 years ago
Lioncash
be1954e04c
core: Fix clang build
Recent changes to the build system that made more warnings be flagged as
errors caused building via clang to break.
Fixes #4795
5 years ago
Lioncash
79504f1a39
core_timing: Remove unused header
5 years ago
Lioncash
25cd5d9dda
core_timing: Move clock initializer into constructor initializer list
Same behavior, minus unnecessary zeroing out of the pointer.
5 years ago
Lioncash
2624b1eae6
core_timing: Resolve sign conversion warning
This constant is only ever assigned to downcount, which is a s64, not a
u64.
5 years ago
Lioncash
a7af349dae
core_timing: Make use of uintptr_t to represent user_data
Makes the interface future-proofed for supporting other platforms in the event we ever support platforms with differing pointer sizes. This way, we have a type in place that is always guaranteed to be able to represent a pointer exactly.
5 years ago
Lioncash
bef1844a51
core_timing: Make TimedCallback take std::chrono::nanoseconds
Enforces our desired time units directly with a concrete type.
6 years ago
Lioncash
8b50c660df
core_timing: Make use of std::chrono with ScheduleEvent
6 years ago
ReinUsesLisp
8562b516c0
core_timing,scheduler: Use std::scoped_lock when possible
Simplifies the cognitive load of procedures using locks and makes locks
safe against exceptions.
6 years ago
Fernando Sahmkow
2f8947583f
Core/Common: Address Feedback.
6 years ago
Fernando Sahmkow
71f1c0f9f9
CoreTiming: Correct rebase bugs and other miscellaneous things.
6 years ago
Fernando Sahmkow
528b19a842
General: Tune the priority of main emulation threads so they have higher priority than less important helper threads.
6 years ago
Fernando Sahmkow
bfb5244cf8
CoreTiming/CycleTimer: Correct Idling.
6 years ago
Fernando Sahmkow
f5e32935ca
SingleCore: Use Cycle Timing instead of Host Timing.
6 years ago