You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
33 lines
1.1 KiB
C++
33 lines
1.1 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "PlatformEventsModule.h"
|
|
#include "Analyzers/PlatformEventTraceAnalysis.h"
|
|
#include "AnalysisServicePrivate.h"
|
|
#include "Model/ContextSwitchesPrivate.h"
|
|
#include "Model/StackSamplesPrivate.h"
|
|
|
|
namespace TraceServices
|
|
{
|
|
|
|
static const FName PlatformEventsModuleName("TraceModule_PlatformEvents");
|
|
|
|
void FPlatformEventsModule::GetModuleInfo(FModuleInfo& OutModuleInfo)
|
|
{
|
|
OutModuleInfo.Name = PlatformEventsModuleName;
|
|
OutModuleInfo.DisplayName = TEXT("PlatformEvents");
|
|
}
|
|
|
|
void FPlatformEventsModule::OnAnalysisBegin(IAnalysisSession& InSession)
|
|
{
|
|
FAnalysisSession& Session = static_cast<FAnalysisSession&>(InSession);
|
|
|
|
FContextSwitchProvider* ContextSwitchProvider = new FContextSwitchProvider(Session);
|
|
FStackSampleProvider* StackSampleProvider = new FStackSampleProvider(Session);
|
|
|
|
Session.AddProvider(FContextSwitchProvider::ProviderName, ContextSwitchProvider);
|
|
Session.AddProvider(FStackSampleProvider::ProviderName, StackSampleProvider);
|
|
Session.AddAnalyzer(new FPlatformEventTraceAnalyzer(Session, *ContextSwitchProvider, *StackSampleProvider));
|
|
}
|
|
|
|
} // namespace TraceServices
|