Commit graph

43 commits

Author SHA1 Message Date
Lioncash
6b7320add4 core: Remove unnecessary enum casts in log calls
Follows the video core PR. fmt doesn't require casts for enum classes
anymore, so we can remove quite a few casts.
2020-12-07 23:02:23 -05:00
Lioncash
1a954b2a59 service: Eliminate usages of the global system instance
Completely removes all usages of the global system instance within the
services code by passing in the using system instance to the services.
2020-11-26 20:03:11 -05:00
Lioncash
da7be67daf ipc_helpers: Remove usage of the global system instance
Resolves numerous deprecation warnings throughout the codebase due to
inclusion of this header. Now building core should be significantly less
noisy (and also relying on less global state).

This also uncovered quite a few modules that were relying on indirect
includes, which have also been fixed.
2020-11-08 15:58:11 -05:00
Morph
45dac6bc5c lm: Silence no return value warning 2020-06-22 22:55:32 -04:00
bunnei
4caff51710 core: memory: Move to Core::Memory namespace.
- helpful to disambiguate Kernel::Memory namespace.
2020-04-17 00:59:28 -04:00
Lioncash
b05bfc6036 core/memory: Migrate over Read{8, 16, 32, 64, Block} to the Memory class
With all of the trivial parts of the memory interface moved over, we can
get right into moving over the bits that are used.

Note that this does require the use of GetInstance from the global
system instance to be used within hle_ipc.cpp and the gdbstub. This is
fine for the time being, as they both already rely on the global system
instance in other functions. These will be removed in a change directed
at both of these respectively.

For now, it's sufficient, as it still accomplishes the goal of
de-globalizing the memory code.
2019-11-26 21:55:39 -05:00
Lioncash
536fc7f0ea core: Prepare various classes for memory read/write migration
Amends a few interfaces to be able to handle the migration over to the
new Memory class by passing the class by reference as a function
parameter where necessary.

Notably, within the filesystem services, this eliminates two ReadBlock()
calls by using the helper functions of HLERequestContext to do that for
us.
2019-11-26 21:55:37 -05:00
Zach Hilman
6212df3beb lm: Flush manager output on core shutdown 2019-09-22 12:34:55 -04:00
Zach Hilman
fa6531ab0f lm: Rename Initialize to Log and implement with manager/reporter
Allows saving and clearer output of data.
2019-09-22 12:34:55 -04:00
Zach Hilman
ef9a7fa1f5 lm: Implement manager class to output to reporter 2019-09-22 12:34:55 -04:00
Zach Hilman
4153bd8d17 core: Add LM::Manager to system
Allows centralized control over logging mechanisms.
2019-09-22 12:34:55 -04:00
Weiyi Wang
89abef3518 remove all occurance of specifying endianness inside BitField
This commit it automatically generated by command in zsh:
sed -i -- 's/BitField<\(.*\)_le>/BitField<\1>/g' **/*(D.)

BitField is now aware to endianness and default to little endian. It expects a value representation type without storage specification for its template parameter.
2019-02-06 18:13:45 +01:00
David Marcec
a2cc3b10bb Changed logging to be "Log before execution", Added more error logging, all services should now log on some level 2018-11-26 17:06:13 +11:00
Lioncash
34e4aaddd9 lm: Implement SetDestination by doing nothing
This service function was likely intended to be a way to redirect where
the output of a log went. e.g. Firing a log over a network, dumping over
a tunneling session, etc.

Given we always want to see the log and not change its output. It's one
of the lucky service functions where the easiest implementation is to
just do nothing at all and return success.
2018-11-19 18:09:40 -05:00
fearlessTobi
63c2e32e20 Port #4182 from Citra: "Prefix all size_t with std::" 2018-09-15 15:21:06 +02:00
Lioncash
b74df62959 lm: Use LOG_DEBUG for printing out trace logs
Using LOG_TRACE here isn't a good idea because LOG_TRACE is only enabled
when yuzu is compiled in debug mode. Debug mode is also quite slow, and
so we're potentially throwing away logging messages that can provide
value when trying to boot games.
2018-08-15 01:07:41 -04:00
Lioncash
e0b0f4eece lm: Handle threads and modules within the logger
The thread field serves to indicate which thread a log is related to and
provides the length of the thread's name, so we can print that out,
ditto for modules.

Now we can know what threads are potentially spawning off logging
messages (for example Lydie & Suelle bounces between MainThread and
LoadingThread when initializing the game).
2018-08-15 01:05:50 -04:00
Lioncash
f77cfab516 lm: Amend name of ILogger
Previously this was being registered with the name "Logger". While we're
at it, also change the name of the class to match it.
2018-08-01 17:08:44 -04:00
Lioncash
91d86df920 lm: Move LM's class declaration into the cpp file
This isn't used directly outside of this translation unit, so we can
hide it from external use.
2018-07-25 22:40:16 -04:00
Lioncash
6f4d3d8163 lm: Amend names of Initialize() in Logger and Initialize() in LM
Amends these to match the information on Switch Brew.
2018-07-25 22:39:39 -04:00
Lioncash
8650be1020 lm: Add missing function entry to Logger's function table 2018-07-25 22:26:32 -04:00
James Rowe
638956aa81 Rename logging macro back to LOG_* 2018-07-02 21:45:47 -04:00
Lioncash
dabfd90dfe
lm: Move logging macros over to new fmt-compatible ones 2018-04-24 12:00:56 -04:00
Lioncash
ccca5e7c28 service: Use nested namespace specifiers where applicable
Tidies up namespace declarations
2018-04-19 22:20:28 -04:00
mailwl
55de13efcc Service/lm: add support to multiline logs 2018-02-13 09:44:53 +03:00
bunnei
649960b4eb logger: Add LM service logging category. 2018-02-04 22:41:55 -05:00
bunnei
69697535bf lm: Ensure log string is non-empty before checking back(). 2018-02-04 22:36:57 -05:00
bunnei
1b1d399e5f hle: Rename RequestBuilder to ResponseBuilder. 2018-01-24 22:24:10 -05:00
bunnei
f9dae99006 service: Fix all incorrect IPC response headers. 2018-01-24 22:21:33 -05:00
Subv
b0489c9a64 Services: Added a todo about returning interfaces as domain objects in lm, hid and time. 2018-01-22 20:40:43 -05:00
Subv
1a9c96e4de LM: Don't create an unnecessary port in Initialize. 2018-01-22 17:35:40 -05:00
bunnei
22465c8722 lm: Minor logging fix to skip a byte. 2018-01-18 00:08:38 -05:00
bunnei
71eeab257f lm: Fix IPC header for Initialize. 2018-01-14 21:45:06 -05:00
bunnei
1247c53786 yuzu: Update license text to be consistent across project. 2018-01-13 16:22:39 -05:00
Subv
188feba457 Services: Allow lm to log single-character messages. 2018-01-10 00:41:29 -05:00
Subv
0368324f79 IPC Cleanup: Remove 3DS-specific code and translate copy, move and domain objects in IPC requests.
Popping objects from the buffer is still not implemented.
2018-01-07 17:11:47 -05:00
bunnei
6f6d9af408 lm: Assert on unsupported multi-message. 2018-01-06 14:41:56 -05:00
bunnei
d083c07c46 lm: Improve Log() to format a useful string. 2018-01-05 00:45:13 -05:00
bunnei
ad073846bc service: Clean up apm/lm/applet_oe/controller/sm ctor/dtor. 2017-12-28 15:27:30 -05:00
bunnei
716e5cf070 lm: Implement lm::Initialize and Logger::log. 2017-10-18 21:41:24 -04:00
bunnei
4fb1b24d68 hle: Implement ConvertSessionToDomain, various cleanups. 2017-10-15 01:24:22 -04:00
bunnei
72eeca1f03 hle: Add service stubs for apm and appletOE. 2017-10-14 22:50:04 -04:00
bunnei
960a1416de hle: Initial implementation of NX service framework and IPC. 2017-10-14 22:18:42 -04:00