From f3e14cae1e644b7e072796f2c26eab67b7a5d1b7 Mon Sep 17 00:00:00 2001 From: bunnei Date: Tue, 2 May 2017 00:09:15 -0400 Subject: core: Keep track of telemetry for the current emulation session. --- src/core/core.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/core/core.h') 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 @@ #include "common/common_types.h" #include "core/memory.h" #include "core/perf_stats.h" +#include "core/telemetry_session.h" class EmuWindow; class ARM_Interface; @@ -80,6 +81,14 @@ public: return cpu_core != nullptr; } + /** + * Returns a reference to the telemetry session for this emulation session. + * @returns Reference to the telemetry session. + */ + Core::TelemetrySession& TelemetrySession() const { + return *telemetry_session; + } + /// Prepare the core emulation for a reschedule void PrepareReschedule(); @@ -117,6 +126,9 @@ private: /// When true, signals that a reschedule should happen bool reschedule_pending{}; + /// Telemetry session for this emulation session + std::unique_ptr telemetry_session; + static System s_instance; }; @@ -124,4 +136,8 @@ inline ARM_Interface& CPU() { return System::GetInstance().CPU(); } +inline TelemetrySession& Telemetry() { + return System::GetInstance().TelemetrySession(); +} + } // namespace Core -- cgit v1.2.3