Commit graph

97 commits

Author SHA1 Message Date
Liam 35d3e7db2a common: remove "yuzu:" prefix from thread names 2022-10-03 18:43:56 -04:00
bunnei 9c32f29af1
Merge pull request #8650 from Kelebek1/vsync
[Coretiming/NVNFlinger] Improve multi-core vsync timing, and core timing accuracy
2022-09-17 11:10:54 -07:00
Kelebek1 e93e898df5 Remove pause callbacks from coretiming 2022-09-13 13:20:35 +01:00
Morph 606cdb17d3 core_timing: Sleep in discrete intervals, yield during spin 2022-08-02 01:01:54 -04:00
Kelebek1 658e1ee426 Add missing looping event schedule signal 2022-08-02 01:01:54 -04:00
Kelebek1 83a24ad638 Make coretiming waiting more accurate 2022-08-02 01:01:54 -04:00
Maide 2e46110379
Revert Coretiming PRs 8531 and 7454 (#8591) 2022-07-27 19:47:06 -04:00
Kelebek1 240650f6a6 Rework CoreTiming 2022-07-10 06:59:40 +01:00
Fernando Sahmkow d3cb9201f1 Core timing: use only one thread. 2022-07-02 23:02:16 +02:00
Fernando Sahmkow 3196d957b0 Adress Feedback. 2022-06-30 10:18:56 +02:00
Fernando Sahmkow 86ccce3721 Address feedback. 2022-06-28 01:19:30 +02:00
Fernando Sahmkow 38e4a144a1 Core: Protect each event from race conditions within it. 2022-06-28 01:10:55 +02:00
Fernando Sahmkow a2d29412cb Core/Common: Corrections to core timing and add critical priority. 2022-06-28 01:10:55 +02:00
Fernando Sahmkow 846c994cc9 Core: Reimplement Core Timing. 2022-06-28 01:10:50 +02:00
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.
2022-04-23 05:55:32 -04:00
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).
2021-05-03 01:19:13 -04:00
bunnei 82f6037ec2 core: hle: Add missing calls to MicroProfileOnThreadExit. 2021-01-11 14:23:16 -08:00
bunnei 3d592972dc
Revert "core: Fix clang build" 2020-10-20 19:07:39 -07:00
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
2020-10-17 19:50:39 -04:00
Lioncash 79504f1a39 core_timing: Remove unused header 2020-08-22 22:12:37 -04:00
Lioncash 25cd5d9dda core_timing: Move clock initializer into constructor initializer list
Same behavior, minus unnecessary zeroing out of the pointer.
2020-08-22 20:26:48 -04:00
Lioncash 2624b1eae6 core_timing: Resolve sign conversion warning
This constant is only ever assigned to downcount, which is a s64, not a
u64.
2020-08-22 20:26:45 -04:00
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.
2020-07-27 21:21:01 -04:00
Lioncash bef1844a51 core_timing: Make TimedCallback take std::chrono::nanoseconds
Enforces our desired time units directly with a concrete type.
2020-07-15 19:41:22 -04:00
Lioncash 8b50c660df core_timing: Make use of std::chrono with ScheduleEvent 2020-07-15 18:54:15 -04:00
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.
2020-06-28 21:42:57 -03:00
Fernando Sahmkow 2f8947583f Core/Common: Address Feedback. 2020-06-27 18:20:06 -04:00
Fernando Sahmkow 71f1c0f9f9 CoreTiming: Correct rebase bugs and other miscellaneous things. 2020-06-27 11:36:11 -04:00
Fernando Sahmkow 528b19a842 General: Tune the priority of main emulation threads so they have higher priority than less important helper threads. 2020-06-27 11:36:09 -04:00
Fernando Sahmkow bfb5244cf8 CoreTiming/CycleTimer: Correct Idling. 2020-06-27 11:36:07 -04:00
Fernando Sahmkow f5e32935ca SingleCore: Use Cycle Timing instead of Host Timing. 2020-06-27 11:36:01 -04:00
Fernando Sahmkow f2ade343e2 SingleCore: Move Host Timing from a sepparate thread to main cpu thread. 2020-06-27 11:35:52 -04:00
Fernando Sahmkow e6f8bde74b General: Fix Stop function 2020-06-27 11:35:47 -04:00
Fernando Sahmkow 07993ac8c8 Kernel: Corrections to Scheduling. 2020-06-27 11:35:23 -04:00
Fernando Sahmkow 18dcb09342 HostTiming: Pause the hardware clock on pause. 2020-06-27 11:35:10 -04:00
Fernando Sahmkow dc58058203 General: Setup yuzu threads' microprofile, naming and registry. 2020-06-27 11:35:09 -04:00
Fernando Sahmkow e31425df38 General: Recover Prometheus project from harddrive failure
This commit: Implements CPU Interrupts, Replaces Cycle Timing for Host 
Timing, Reworks the Kernel's Scheduler, Introduce Idle State and 
Suspended State, Recreates the bootmanager, Initializes Multicore 
system.
2020-06-27 11:35:06 -04:00
Fernando Sahmkow 1e6f8aba04 Core: Set all hardware emulation constants in a single file. 2020-02-11 20:19:11 -04:00
bunnei ec0ce96c56
core_timing: Use better reference tracking for EventType. (#3159)
* core_timing: Use better reference tracking for EventType.

- Moves ownership of the event to the caller, ensuring we don't fire events for destroyed objects.
- Removes need for unique names - we won't be using this for save states anyways.
2019-11-26 21:48:56 -05:00
Fernando Sahmkow a4ae11d63e Core_Timing: Address Remaining feedback. 2019-10-12 07:26:38 -04:00
Fernando Sahmkow e0650a2034 Core_Timing: Address Feedback and suppress warnings. 2019-10-11 14:44:14 -04:00
Fernando Sahmkow 96f2b16356 Core Timing: Correct Idle and remove lefting pragma 2019-10-09 12:30:33 -04:00
Fernando Sahmkow 65aff6930b Core Timing: General corrections and added tests. 2019-10-09 12:30:33 -04:00
Fernando Sahmkow 555866f8dc Core Timing: Rework Core Timing to run all cores evenly. 2019-10-09 12:30:31 -04:00
Fernando Sahmkow 90792cdb6e Core_Timing: Make core_timing threadsafe by default.
The old implementation had faulty Threadsafe methods where events could
be missing. This implementation unifies unsafe/safe methods and makes
core timing thread safe overall.
2019-06-16 14:14:35 -04:00
Lioncash c5d41fd812 core/core_timing: Make callback parameters consistent
In some cases, our callbacks were using s64 as a parameter, and in other
cases, they were using an int, which is inconsistent.

To make all callbacks consistent, we can just use an s64 as the type for
late cycles, given it gets rid of the need to cast internally.

While we're at it, also resolve some signed/unsigned conversions that
were occurring related to the callback registration.
2019-03-24 18:12:17 -04:00
Lioncash bd983414f6 core_timing: Convert core timing into a class
Gets rid of the largest set of mutable global state within the core.
This also paves a way for eliminating usages of GetInstance() on the
System class as a follow-up.

Note that no behavioral changes have been made, and this simply extracts
the functionality into a class. This also has the benefit of making
dependencies on the core timing functionality explicit within the
relevant interfaces.
2019-02-15 21:50:25 -05:00
bunnei 8490e7746a
Merge pull request #2115 from lioncash/local
core_timing: Make EmptyTimedCallback a local variable
2019-02-13 21:42:04 -05:00
Lioncash f0bfb24c61 threadsafe_queue: Remove NeedSize template parameter
The necessity of this parameter is dubious at best, and in 2019 probably
offers completely negligible savings as opposed to just leaving this
enabled. This removes it and simplifies the overall interface.
2019-02-12 22:09:51 -05:00
Lioncash 83ba3515ec core_timing: Make EmptyTimedCallback a local variable
Given this is only used in one place, it can be moved closest to its
usage site.
2019-02-12 21:47:18 -05:00