mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-23 19:26:55 -04:00
kern: optimize logging for release kernel strings (saves printf space in .text)
This commit is contained in:
parent
fdf008108c
commit
8b49cea4a9
4 changed files with 53 additions and 8 deletions
|
@ -28,6 +28,8 @@ namespace ams::kern {
|
|||
static NOINLINE void Printf(const char *format, ...) __attribute__((format(printf, 1, 2)));
|
||||
static NOINLINE void VPrintf(const char *format, ::std::va_list vl);
|
||||
|
||||
static NOINLINE void LogException(const char *str);
|
||||
|
||||
static NOINLINE Result PrintUserString(ams::kern::svc::KUserPointer<const char *> user_str, size_t len);
|
||||
|
||||
/* Functionality for preserving across sleep. */
|
||||
|
@ -49,6 +51,8 @@ namespace ams::kern {
|
|||
|
||||
#endif
|
||||
|
||||
#define MESOSPHERE_EXCEPTION_LOG(str) ::ams::kern::KDebugLog::LogException(str)
|
||||
|
||||
#define MESOSPHERE_RELEASE_LOG(fmt, ...) ::ams::kern::KDebugLog::Printf((fmt), ## __VA_ARGS__)
|
||||
#define MESOSPHERE_RELEASE_VLOG(fmt, vl) ::ams::kern::KDebugLog::VPrintf((fmt), (vl))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue