/Engine/Source/Runtime/Core/Public/GenericPlatform/GenericPlatformMisc.h
On platforms that support run-time PGI on/off, stops the current collection and writes out the file (or completes its write). The filename must have been given to the StartNewPGICollection() at the start of collection (it is needed in advance since the collection process may stream to it).
true if everything was successful
static bool StopPGOCollectionAndCloseFile()