Commit Graph

57 Commits (e0650a2034026d8292196128d2f9decb50eeb0f3)

Author SHA1 Message Date
Fernando Sahmkow e0650a2034 Core_Timing: Address Feedback and suppress warnings. 6 years ago
Fernando Sahmkow 96f2b16356 Core Timing: Correct Idle and remove lefting pragma 6 years ago
Fernando Sahmkow 65aff6930b Core Timing: General corrections and added tests. 6 years ago
Fernando Sahmkow 555866f8dc Core Timing: Rework Core Timing to run all cores evenly. 6 years ago
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.
6 years ago
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.
6 years ago
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.
6 years ago
bunnei 8490e7746a
Merge pull request #2115 from lioncash/local
core_timing: Make EmptyTimedCallback a local variable
6 years ago
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.
6 years ago
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.
6 years ago
Lioncash 48d9d66dc5 core_timing: Rename CoreTiming namespace to Core::Timing
Places all of the timing-related functionality under the existing Core
namespace to keep things consistent, rather than having the timing
utilities sitting in its own completely separate namespace.
6 years ago
B3n30 eab35c8235 Core::CoreTiming: add UnscheduleEventThreadsafe 7 years ago
Subv 0135b328ed Kernel/Thread: Always use the threadsafe option when scheduling wakeups.
WakeAfterDelay might be called from any host thread, so err on the side of caution and use the thread-safe CoreTiming::ScheduleEventThreadsafe.

Note that CoreTiming is still far from thread-safe, there may be more things we have to work on for it to be up to par with what we want.
7 years ago
bunnei 83ef37ca37
Merge pull request #934 from lioncash/chrono
core_timing: Make GetGlobalTimeUs() return std::chrono::microseconds
7 years ago
Lioncash a0c3a46aa9 core_timing: Make GetGlobalTimeUs() return std::chrono::microseconds
Enforces the time unit being returned and also allows using the standard
time utilities to manipulate it.
7 years ago
Lioncash d9815b523b core_timing: Use transparent functors where applicable
Gets rid of the need to hardcode the type in multiple places. This will
now be deduced automatically, based off the elements in the container
being provided to the algorithm.
7 years ago
MerryMage 44646e2ea0 core_timing: Split off utility functions into core_timing_util 7 years ago
James Rowe 638956aa81 Rename logging macro back to LOG_* 7 years ago
Lioncash 9f3641755e
core_timing: Don't include the log header in core timing's header
Avoids propagating logging macros and facilities to files that may not need them.
This also allows hiding an internal constant.
7 years ago
Lioncash 8475496630
general: Convert assertion macros over to be fmt-compatible 7 years ago
River City Ransomware dd62f125c3 Fixes some cast warnings, partial port of citra #3064 (#106)
* Fixes some cast warnings, partially fixes citra #3064

* Converted casts to uint32_t to u32

* Ran clang-format
7 years ago
B3n30 82151d407d CoreTiming: Reworked CoreTiming (cherry-picked from Citra #3119)
* CoreTiming: New CoreTiming; Add Test for CoreTiming
7 years ago
bunnei 79e0dd249e core_timing: Increase clock speed for Switch docked. 7 years ago
Huw Pascoe 529f4a0131 Moved down_count to CoreTiming 8 years ago
wwylele 47960b0659 CoreTiming: use named constant for ARM11 clock rate 8 years ago
bunnei e26fbfd1d7 core: Replace "AppCore" nomenclature with just "CPU". 8 years ago
bunnei 232ef55c1a core: Consolidate core and system state, remove system module & cleanups. 8 years ago
Yuri Kunde Schlesner 84fbbe2629 Use negative priorities to avoid special-casing the self-include 9 years ago
Emmanuel Gil Peyrot ebdae19fd2 Remove empty newlines in #include blocks.
This makes clang-format useful on those.

Also add a bunch of forgotten transitive includes, which otherwise
prevented compilation.
9 years ago
Yuri Kunde Schlesner 396a8d91a4 Manually tweak source formatting and then re-run clang-format 9 years ago
Emmanuel Gil Peyrot dc8479928c Sources: Run clang-format on everything. 9 years ago
Lioncash 751fbfdcc3 general: Silence some warnings when using clang 10 years ago
Lioncash 07bfe0abbb general: Replace 0 literals with nullptr where applicable 10 years ago
zawata 1be1ff23a9 Core : Fix Conversion Warnings 10 years ago
Emmanuel Gil Peyrot aea15f5c73 Core: Cleanup core includes. 10 years ago
Emmanuel Gil Peyrot 8cf9eb7f43 Common: Fix FileUtil includes, and everything relying on those. 10 years ago
Emmanuel Gil Peyrot b1503b2020 Remove every trailing whitespace from the project (but externals). 10 years ago
bunnei 5a855bdb2f CoreTiming: Initialize static variables at bootup. 10 years ago
archshift 5efd149ad5 Remove the useless msg_handler compilation unit that was left over from Dolphin 10 years ago
Lioncash 5d2366e1e9 core/video_core: Use in-place construction where possible 10 years ago
bunnei 12181c8a64 Merge pull request #529 from Subv/master
Build: Fixed some warnings
10 years ago
Lioncash 0c6434c379 core: Apply static to local functions 10 years ago
Subv 8e2b248e05 Build: Fixed some warnings 10 years ago
archshift ef24e72b26 Asserts: break/crash program, fit to style guide; log.h->assert.h
Involves making asserts use printf instead of the log functions (log functions are asynchronous and, as such, the log won't be printed in time)
As such, the log type argument was removed (printf obviously can't use it, and it's made obsolete by the file and line printing)

Also removed some GEKKO cruft.
10 years ago
Lioncash bfef0aa07e core_timing: Mark several variables as static
These are only used in this translation unit.
10 years ago
Yuri Kunde Schlesner 7b3452c730 Move ThreadContext to core/core.h and deal with the fallout 10 years ago
Subv 9bf82beb4c CoreTiming: Ported the CoreTiming namespace from PPSSPP
Implemented the required calls to make it work.

CoreTiming: Added a new logging class Core_Timing.
10 years ago
purpasmart96 ebfd831ccb License change 10 years ago
Yuri Kunde Schlesner 0600e2d8b5 Convert old logging calls to new logging macros 10 years ago
Rohit Nirmal 8a62423970 Change NULLs to nullptrs. 10 years ago