/Engine/Source/Runtime/Core/Public/GenericPlatform/GenericPlatformMisc.h
Returns true if PGI (profile-guided instrumentation, needed for PGO) is currently ongoing. Note that on some platforms can start and stop profile data collection.
static bool IsPGIActive()