AuroraRuntime/Source/Telemetry/Telemetry.cpp

83 lines
1.3 KiB
C++
Raw Normal View History

2021-06-27 21:25:29 +00:00
/***
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: Telemetry.cpp
Date: 2021-6-17
Author: Reece
***/
2021-09-30 14:57:41 +00:00
#include <Source/RuntimeInternal.hpp>
#include <Source/Debug/Debug.hpp>
2021-06-27 21:25:29 +00:00
#include "Telemetry.hpp"
2021-06-27 21:25:29 +00:00
namespace Aurora::Telemetry
{
2022-04-06 01:24:38 +00:00
static bool bHasInit {};
static AuThreadPrimitives::CriticalSectionUnique_t gGroupLock;
void BeginBlock()
{
2022-04-06 01:24:38 +00:00
if (!bHasInit) return;
gGroupLock->Lock();
}
void EndBlock()
{
2022-04-06 01:24:38 +00:00
if (!bHasInit) return;
gGroupLock->Unlock();
}
2021-06-27 21:25:29 +00:00
void InsertOSError(const Debug::OSError_t &osError)
{
2022-04-06 01:24:38 +00:00
if (!bHasInit) return;
2021-06-27 21:25:29 +00:00
}
void InsertMsgError(const Debug::LastError &error)
{
2022-04-06 01:24:38 +00:00
if (!bHasInit) return;
2021-06-27 21:25:29 +00:00
}
void InsertCError(AuSInt cError)
{
}
void InsertManualFence(AuUInt32 fence)
{
}
void InsertBackTrace(AuUInt32 fence)
{
}
2021-06-27 21:25:29 +00:00
void Report(Telemetry::NewBlockboxEntry &entry)
{
}
void ReportDyingBreath(Telemetry::NewBlackBoxEntryMinidump &entry)
{
}
void ReportSysInfo()
{
}
void Init()
{
2022-01-21 22:37:29 +00:00
gGroupLock = AuThreadPrimitives::CriticalSectionUnique();
ReportSysInfo();
}
2021-06-27 21:25:29 +00:00
2021-06-27 21:25:29 +00:00
AUKN_SYM void Mayday()
{
Debug::CheckErrors();
Debug::PlatformHandleFatal(false);
2021-06-27 21:25:29 +00:00
}
}