diff options
| author | 2018-02-04 22:59:52 -0500 | |
|---|---|---|
| committer | 2018-02-04 22:59:52 -0500 | |
| commit | 8e1dbb26bd50ad5c2d6b17f89d53198d42a7d800 (patch) | |
| tree | db9e3e91cc5981cc1c017cf6eb6c04bfd7ba23a6 /src | |
| parent | logger: Add SET service logging category. (diff) | |
| download | yuzu-8e1dbb26bd50ad5c2d6b17f89d53198d42a7d800.tar.gz yuzu-8e1dbb26bd50ad5c2d6b17f89d53198d42a7d800.tar.xz yuzu-8e1dbb26bd50ad5c2d6b17f89d53198d42a7d800.zip | |
logger: Add Time service logging category.
Diffstat (limited to 'src')
| -rw-r--r-- | src/common/logging/backend.cpp | 1 | ||||
| -rw-r--r-- | src/common/logging/log.h | 1 | ||||
| -rw-r--r-- | src/core/hle/service/time/time.cpp | 20 |
3 files changed, 12 insertions, 10 deletions
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp index 2848fe116..2bbc5bb16 100644 --- a/src/common/logging/backend.cpp +++ b/src/common/logging/backend.cpp | |||
| @@ -44,6 +44,7 @@ namespace Log { | |||
| 44 | SUB(Service, PCTL) \ | 44 | SUB(Service, PCTL) \ |
| 45 | SUB(Service, SET) \ | 45 | SUB(Service, SET) \ |
| 46 | SUB(Service, SM) \ | 46 | SUB(Service, SM) \ |
| 47 | SUB(Service, Time) \ | ||
| 47 | SUB(Service, VI) \ | 48 | SUB(Service, VI) \ |
| 48 | CLS(HW) \ | 49 | CLS(HW) \ |
| 49 | SUB(HW, Memory) \ | 50 | SUB(HW, Memory) \ |
diff --git a/src/common/logging/log.h b/src/common/logging/log.h index f7336cea8..0d79b8498 100644 --- a/src/common/logging/log.h +++ b/src/common/logging/log.h | |||
| @@ -61,6 +61,7 @@ enum class Class : ClassType { | |||
| 61 | Service_PCTL, ///< The PCTL (Parental control) service | 61 | Service_PCTL, ///< The PCTL (Parental control) service |
| 62 | Service_SET, ///< The SET (Settings) service | 62 | Service_SET, ///< The SET (Settings) service |
| 63 | Service_SM, ///< The SM (Service manager) service | 63 | Service_SM, ///< The SM (Service manager) service |
| 64 | Service_Time, ///< The time service | ||
| 64 | Service_VI, ///< The VI (Video interface) service | 65 | Service_VI, ///< The VI (Video interface) service |
| 65 | HW, ///< Low-level hardware emulation | 66 | HW, ///< Low-level hardware emulation |
| 66 | HW_Memory, ///< Memory-map and address translation | 67 | HW_Memory, ///< Memory-map and address translation |
diff --git a/src/core/hle/service/time/time.cpp b/src/core/hle/service/time/time.cpp index 5802f6f6c..532b9c1c5 100644 --- a/src/core/hle/service/time/time.cpp +++ b/src/core/hle/service/time/time.cpp | |||
| @@ -29,14 +29,14 @@ private: | |||
| 29 | const s64 time_since_epoch{std::chrono::duration_cast<std::chrono::seconds>( | 29 | const s64 time_since_epoch{std::chrono::duration_cast<std::chrono::seconds>( |
| 30 | std::chrono::system_clock::now().time_since_epoch()) | 30 | std::chrono::system_clock::now().time_since_epoch()) |
| 31 | .count()}; | 31 | .count()}; |
| 32 | LOG_DEBUG(Service, "called"); | 32 | LOG_DEBUG(Service_Time, "called"); |
| 33 | IPC::ResponseBuilder rb{ctx, 4}; | 33 | IPC::ResponseBuilder rb{ctx, 4}; |
| 34 | rb.Push(RESULT_SUCCESS); | 34 | rb.Push(RESULT_SUCCESS); |
| 35 | rb.Push<u64>(time_since_epoch); | 35 | rb.Push<u64>(time_since_epoch); |
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | void GetSystemClockContext(Kernel::HLERequestContext& ctx) { | 38 | void GetSystemClockContext(Kernel::HLERequestContext& ctx) { |
| 39 | LOG_WARNING(Service, "(STUBBED) called"); | 39 | LOG_WARNING(Service_Time, "(STUBBED) called"); |
| 40 | SystemClockContext system_clock_ontext{}; | 40 | SystemClockContext system_clock_ontext{}; |
| 41 | IPC::ResponseBuilder rb{ctx, (sizeof(SystemClockContext) / 4) + 2}; | 41 | IPC::ResponseBuilder rb{ctx, (sizeof(SystemClockContext) / 4) + 2}; |
| 42 | rb.Push(RESULT_SUCCESS); | 42 | rb.Push(RESULT_SUCCESS); |
| @@ -55,7 +55,7 @@ public: | |||
| 55 | 55 | ||
| 56 | private: | 56 | private: |
| 57 | void GetCurrentTimePoint(Kernel::HLERequestContext& ctx) { | 57 | void GetCurrentTimePoint(Kernel::HLERequestContext& ctx) { |
| 58 | LOG_DEBUG(Service, "called"); | 58 | LOG_DEBUG(Service_Time, "called"); |
| 59 | SteadyClockTimePoint steady_clock_time_point{cyclesToMs(CoreTiming::GetTicks()) / 1000}; | 59 | SteadyClockTimePoint steady_clock_time_point{cyclesToMs(CoreTiming::GetTicks()) / 1000}; |
| 60 | IPC::ResponseBuilder rb{ctx, (sizeof(SteadyClockTimePoint) / 4) + 2}; | 60 | IPC::ResponseBuilder rb{ctx, (sizeof(SteadyClockTimePoint) / 4) + 2}; |
| 61 | rb.Push(RESULT_SUCCESS); | 61 | rb.Push(RESULT_SUCCESS); |
| @@ -76,7 +76,7 @@ public: | |||
| 76 | 76 | ||
| 77 | private: | 77 | private: |
| 78 | void GetDeviceLocationName(Kernel::HLERequestContext& ctx) { | 78 | void GetDeviceLocationName(Kernel::HLERequestContext& ctx) { |
| 79 | LOG_WARNING(Service, "(STUBBED) called"); | 79 | LOG_WARNING(Service_Time, "(STUBBED) called"); |
| 80 | LocationName location_name{}; | 80 | LocationName location_name{}; |
| 81 | IPC::ResponseBuilder rb{ctx, (sizeof(LocationName) / 4) + 2}; | 81 | IPC::ResponseBuilder rb{ctx, (sizeof(LocationName) / 4) + 2}; |
| 82 | rb.Push(RESULT_SUCCESS); | 82 | rb.Push(RESULT_SUCCESS); |
| @@ -84,7 +84,7 @@ private: | |||
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | void GetTotalLocationNameCount(Kernel::HLERequestContext& ctx) { | 86 | void GetTotalLocationNameCount(Kernel::HLERequestContext& ctx) { |
| 87 | LOG_WARNING(Service, "(STUBBED) called"); | 87 | LOG_WARNING(Service_Time, "(STUBBED) called"); |
| 88 | IPC::ResponseBuilder rb{ctx, 3}; | 88 | IPC::ResponseBuilder rb{ctx, 3}; |
| 89 | rb.Push(RESULT_SUCCESS); | 89 | rb.Push(RESULT_SUCCESS); |
| 90 | rb.Push<u32>(0); | 90 | rb.Push<u32>(0); |
| @@ -94,7 +94,7 @@ private: | |||
| 94 | IPC::RequestParser rp{ctx}; | 94 | IPC::RequestParser rp{ctx}; |
| 95 | u64 posix_time = rp.Pop<u64>(); | 95 | u64 posix_time = rp.Pop<u64>(); |
| 96 | 96 | ||
| 97 | LOG_WARNING(Service, "(STUBBED) called, posix_time=0x%016llX", posix_time); | 97 | LOG_WARNING(Service_Time, "(STUBBED) called, posix_time=0x%016llX", posix_time); |
| 98 | 98 | ||
| 99 | CalendarTime calendar_time{2018, 1, 1, 0, 0, 0}; | 99 | CalendarTime calendar_time{2018, 1, 1, 0, 0, 0}; |
| 100 | CalendarAdditionalInfo additional_info{}; | 100 | CalendarAdditionalInfo additional_info{}; |
| @@ -109,28 +109,28 @@ void Module::Interface::GetStandardUserSystemClock(Kernel::HLERequestContext& ct | |||
| 109 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 109 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 110 | rb.Push(RESULT_SUCCESS); | 110 | rb.Push(RESULT_SUCCESS); |
| 111 | rb.PushIpcInterface<ISystemClock>(); | 111 | rb.PushIpcInterface<ISystemClock>(); |
| 112 | LOG_DEBUG(Service, "called"); | 112 | LOG_DEBUG(Service_Time, "called"); |
| 113 | } | 113 | } |
| 114 | 114 | ||
| 115 | void Module::Interface::GetStandardNetworkSystemClock(Kernel::HLERequestContext& ctx) { | 115 | void Module::Interface::GetStandardNetworkSystemClock(Kernel::HLERequestContext& ctx) { |
| 116 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 116 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 117 | rb.Push(RESULT_SUCCESS); | 117 | rb.Push(RESULT_SUCCESS); |
| 118 | rb.PushIpcInterface<ISystemClock>(); | 118 | rb.PushIpcInterface<ISystemClock>(); |
| 119 | LOG_DEBUG(Service, "called"); | 119 | LOG_DEBUG(Service_Time, "called"); |
| 120 | } | 120 | } |
| 121 | 121 | ||
| 122 | void Module::Interface::GetStandardSteadyClock(Kernel::HLERequestContext& ctx) { | 122 | void Module::Interface::GetStandardSteadyClock(Kernel::HLERequestContext& ctx) { |
| 123 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 123 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 124 | rb.Push(RESULT_SUCCESS); | 124 | rb.Push(RESULT_SUCCESS); |
| 125 | rb.PushIpcInterface<ISteadyClock>(); | 125 | rb.PushIpcInterface<ISteadyClock>(); |
| 126 | LOG_DEBUG(Service, "called"); | 126 | LOG_DEBUG(Service_Time, "called"); |
| 127 | } | 127 | } |
| 128 | 128 | ||
| 129 | void Module::Interface::GetTimeZoneService(Kernel::HLERequestContext& ctx) { | 129 | void Module::Interface::GetTimeZoneService(Kernel::HLERequestContext& ctx) { |
| 130 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | 130 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; |
| 131 | rb.Push(RESULT_SUCCESS); | 131 | rb.Push(RESULT_SUCCESS); |
| 132 | rb.PushIpcInterface<ITimeZoneService>(); | 132 | rb.PushIpcInterface<ITimeZoneService>(); |
| 133 | LOG_DEBUG(Service, "called"); | 133 | LOG_DEBUG(Service_Time, "called"); |
| 134 | } | 134 | } |
| 135 | 135 | ||
| 136 | Module::Interface::Interface(std::shared_ptr<Module> time, const char* name) | 136 | Module::Interface::Interface(std::shared_ptr<Module> time, const char* name) |