Files
UnrealEngineUWP/Engine/Source/Developer/TraceServices/Private/Modules/PlatformEventsModule.cpp
ionut matasaru 9f5c9e10ed [Insights]
- Timing view: Added "Cpu Core" tracks when context switches are available. By default the tracks are hidden and can be enabled from Tracks /  Context Switches sub-menu.
  - Timing view: Added "Alt + C" shortcut key to toggle visibility of "Cpu Core" tracks.
  - Timing view: Added "filter by event type" for Cpu Core tracks. Double click an event in a Cpu Core track highlights all events of same type (same thread) in all Cpu Core tracks. Also fixed the "filter by event type" to fade out / highlight only tracks of same type.

#rb Catalin.Dragoiu

[CL 16955032 by ionut matasaru in ue5-main branch]
2021-07-26 08:14:49 -04:00

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);
FContextSwitchesProvider* ContextSwitchesProvider = new FContextSwitchesProvider(Session);
FStackSamplesProvider* StackSamplesProvider = new FStackSamplesProvider(Session);
Session.AddProvider(FContextSwitchesProvider::ProviderName, ContextSwitchesProvider);
Session.AddProvider(FStackSamplesProvider::ProviderName, StackSamplesProvider);
Session.AddAnalyzer(new FPlatformEventTraceAnalyzer(Session, *ContextSwitchesProvider, *StackSamplesProvider));
}
} // namespace TraceServices