summaryrefslogtreecommitdiff
path: root/src/core/core.h
diff options
context:
space:
mode:
authorGravatar bunnei2017-05-02 00:09:15 -0400
committerGravatar bunnei2017-05-24 19:16:22 -0400
commitf3e14cae1e644b7e072796f2c26eab67b7a5d1b7 (patch)
tree27a0b689d399425f54e1559c64a8cf935ce81c5e /src/core/core.h
parentcommon: Add a generic interface for logging telemetry fields. (diff)
downloadyuzu-f3e14cae1e644b7e072796f2c26eab67b7a5d1b7.tar.gz
yuzu-f3e14cae1e644b7e072796f2c26eab67b7a5d1b7.tar.xz
yuzu-f3e14cae1e644b7e072796f2c26eab67b7a5d1b7.zip
core: Keep track of telemetry for the current emulation session.
Diffstat (limited to 'src/core/core.h')
-rw-r--r--src/core/core.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/core/core.h b/src/core/core.h
index 6c9c936b5..6af772831 100644
--- a/src/core/core.h
+++ b/src/core/core.h
@@ -9,6 +9,7 @@
9#include "common/common_types.h" 9#include "common/common_types.h"
10#include "core/memory.h" 10#include "core/memory.h"
11#include "core/perf_stats.h" 11#include "core/perf_stats.h"
12#include "core/telemetry_session.h"
12 13
13class EmuWindow; 14class EmuWindow;
14class ARM_Interface; 15class ARM_Interface;
@@ -80,6 +81,14 @@ public:
80 return cpu_core != nullptr; 81 return cpu_core != nullptr;
81 } 82 }
82 83
84 /**
85 * Returns a reference to the telemetry session for this emulation session.
86 * @returns Reference to the telemetry session.
87 */
88 Core::TelemetrySession& TelemetrySession() const {
89 return *telemetry_session;
90 }
91
83 /// Prepare the core emulation for a reschedule 92 /// Prepare the core emulation for a reschedule
84 void PrepareReschedule(); 93 void PrepareReschedule();
85 94
@@ -117,6 +126,9 @@ private:
117 /// When true, signals that a reschedule should happen 126 /// When true, signals that a reschedule should happen
118 bool reschedule_pending{}; 127 bool reschedule_pending{};
119 128
129 /// Telemetry session for this emulation session
130 std::unique_ptr<Core::TelemetrySession> telemetry_session;
131
120 static System s_instance; 132 static System s_instance;
121}; 133};
122 134
@@ -124,4 +136,8 @@ inline ARM_Interface& CPU() {
124 return System::GetInstance().CPU(); 136 return System::GetInstance().CPU();
125} 137}
126 138
139inline TelemetrySession& Telemetry() {
140 return System::GetInstance().TelemetrySession();
141}
142
127} // namespace Core 143} // namespace Core