Removes LOADING_TIME_PROFILE_SECTION macros that are unused

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
monroegm-disable-blank-issue-2
Esteban Papp 4 years ago
parent a97bccbf38
commit 63cd3db956

@ -342,7 +342,7 @@ void CCryEditDoc::Load(TDocMultiArchive& arrXmlAr, const QString& szFilename)
// Register this level and its content hash as version // Register this level and its content hash as version
GetIEditor()->GetSettingsManager()->AddToolVersion(fileName, levelHash); GetIEditor()->GetSettingsManager()->AddToolVersion(fileName, levelHash);
GetIEditor()->GetSettingsManager()->RegisterEvent(loadEvent); GetIEditor()->GetSettingsManager()->RegisterEvent(loadEvent);
LOADING_TIME_PROFILE_SECTION(gEnv->pSystem);
CAutoDocNotReady autoDocNotReady; CAutoDocNotReady autoDocNotReady;
HEAP_CHECK HEAP_CHECK

@ -497,8 +497,7 @@ bool CGameEngine::LoadLevel(
[[maybe_unused]] bool bDeleteAIGraph, [[maybe_unused]] bool bDeleteAIGraph,
bool bReleaseResources) bool bReleaseResources)
{ {
LOADING_TIME_PROFILE_SECTION(GetIEditor()->GetSystem()); m_bLevelLoaded = false;
m_bLevelLoaded = false;
CLogFile::FormatLine("Loading map '%s' into engine...", m_levelPath.toUtf8().data()); CLogFile::FormatLine("Loading map '%s' into engine...", m_levelPath.toUtf8().data());
// Switch the current directory back to the Primary CD folder first. // Switch the current directory back to the Primary CD folder first.
// The engine might have trouble to find some files when the current // The engine might have trouble to find some files when the current

@ -1149,11 +1149,6 @@ struct DiskOperationInfo
#endif #endif
#define LOADING_TIME_PROFILE_SECTION
#define LOADING_TIME_PROFILE_SECTION_ARGS(...)
#define LOADING_TIME_PROFILE_SECTION_NAMED(sectionName)
#define LOADING_TIME_PROFILE_SECTION_NAMED_ARGS(sectionName, ...)
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
// CrySystem DLL Exports. // CrySystem DLL Exports.
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////

@ -45,8 +45,6 @@ void CLevelInfo::GetMemoryUsage(ICrySizer* pSizer) const
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
bool CLevelInfo::OpenLevelPak() bool CLevelInfo::OpenLevelPak()
{ {
LOADING_TIME_PROFILE_SECTION;
bool usePrefabSystemForLevels = false; bool usePrefabSystemForLevels = false;
AzFramework::ApplicationRequests::Bus::BroadcastResult( AzFramework::ApplicationRequests::Bus::BroadcastResult(
usePrefabSystemForLevels, &AzFramework::ApplicationRequests::IsPrefabSystemForLevelsEnabled); usePrefabSystemForLevels, &AzFramework::ApplicationRequests::IsPrefabSystemForLevelsEnabled);
@ -69,8 +67,6 @@ bool CLevelInfo::OpenLevelPak()
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
void CLevelInfo::CloseLevelPak() void CLevelInfo::CloseLevelPak()
{ {
LOADING_TIME_PROFILE_SECTION;
bool usePrefabSystemForLevels = false; bool usePrefabSystemForLevels = false;
AzFramework::ApplicationRequests::Bus::BroadcastResult( AzFramework::ApplicationRequests::Bus::BroadcastResult(
usePrefabSystemForLevels, &AzFramework::ApplicationRequests::IsPrefabSystemForLevelsEnabled); usePrefabSystemForLevels, &AzFramework::ApplicationRequests::IsPrefabSystemForLevelsEnabled);
@ -190,7 +186,6 @@ CLevelSystem::CLevelSystem(ISystem* pSystem, const char* levelsFolder)
, m_pCurrentLevel(0) , m_pCurrentLevel(0)
, m_pLoadingLevelInfo(0) , m_pLoadingLevelInfo(0)
{ {
LOADING_TIME_PROFILE_SECTION;
CRY_ASSERT(pSystem); CRY_ASSERT(pSystem);
//if (!gEnv->IsEditor()) //if (!gEnv->IsEditor())
@ -297,8 +292,6 @@ void CLevelSystem::ScanFolder(const char* subfolder, bool modFolder)
AZStd::unordered_set<AZStd::string> pakList; AZStd::unordered_set<AZStd::string> pakList;
const bool allowFileSystem = true;
const uint32_t skipPakFiles = 1;
AZ::IO::ArchiveFileIterator handle = pPak->FindFirst(search.c_str(), AZ::IO::IArchive::eFileSearchType_AllowOnDiskOnly); AZ::IO::ArchiveFileIterator handle = pPak->FindFirst(search.c_str(), AZ::IO::IArchive::eFileSearchType_AllowOnDiskOnly);
if (handle) if (handle)
@ -566,8 +559,6 @@ ILevel* CLevelSystem::LoadLevelInternal(const char* _levelName)
// Not remove a scope!!! // Not remove a scope!!!
{ {
LOADING_TIME_PROFILE_SECTION;
//m_levelLoadStartTime = gEnv->pTimer->GetAsyncTime(); //m_levelLoadStartTime = gEnv->pTimer->GetAsyncTime();
CLevelInfo* pLevelInfo = GetLevelInfoInternal(levelName); CLevelInfo* pLevelInfo = GetLevelInfoInternal(levelName);
@ -582,7 +573,6 @@ ILevel* CLevelSystem::LoadLevelInternal(const char* _levelName)
m_bLevelLoaded = false; m_bLevelLoaded = false;
const bool bLoadingSameLevel = azstricmp(m_lastLevelName.c_str(), levelName) == 0;
m_lastLevelName = levelName; m_lastLevelName = levelName;
delete m_pCurrentLevel; delete m_pCurrentLevel;
@ -746,8 +736,6 @@ void CLevelSystem::OnLoadingStart(const char* levelName)
GetISystem()->GetISystemEventDispatcher()->OnSystemEvent(ESYSTEM_EVENT_LEVEL_LOAD_START, 0, 0); GetISystem()->GetISystemEventDispatcher()->OnSystemEvent(ESYSTEM_EVENT_LEVEL_LOAD_START, 0, 0);
LOADING_TIME_PROFILE_SECTION(gEnv->pSystem);
for (AZStd::vector<ILevelSystemListener*>::const_iterator it = m_listeners.begin(); it != m_listeners.end(); ++it) for (AZStd::vector<ILevelSystemListener*>::const_iterator it = m_listeners.begin(); it != m_listeners.end(); ++it)
{ {
(*it)->OnLoadingStart(levelName); (*it)->OnLoadingStart(levelName);

@ -58,7 +58,6 @@ namespace LegacyLevelSystem
SpawnableLevelSystem::SpawnableLevelSystem(ISystem* pSystem) SpawnableLevelSystem::SpawnableLevelSystem(ISystem* pSystem)
: m_pSystem(pSystem) : m_pSystem(pSystem)
{ {
LOADING_TIME_PROFILE_SECTION;
CRY_ASSERT(pSystem); CRY_ASSERT(pSystem);
m_fLastLevelLoadTime = 0; m_fLastLevelLoadTime = 0;
@ -248,8 +247,6 @@ namespace LegacyLevelSystem
// This scope is specifically used for marking a loading time profile section // This scope is specifically used for marking a loading time profile section
{ {
LOADING_TIME_PROFILE_SECTION;
m_bLevelLoaded = false; m_bLevelLoaded = false;
m_lastLevelName = levelName; m_lastLevelName = levelName;
gEnv->pConsole->SetScrollMax(600); gEnv->pConsole->SetScrollMax(600);
@ -388,8 +385,6 @@ namespace LegacyLevelSystem
GetISystem()->GetISystemEventDispatcher()->OnSystemEvent(ESYSTEM_EVENT_LEVEL_LOAD_START, 0, 0); GetISystem()->GetISystemEventDispatcher()->OnSystemEvent(ESYSTEM_EVENT_LEVEL_LOAD_START, 0, 0);
LOADING_TIME_PROFILE_SECTION(gEnv->pSystem);
for (auto& listener : m_listeners) for (auto& listener : m_listeners)
{ {
listener->OnLoadingStart(levelName); listener->OnLoadingStart(levelName);

@ -872,7 +872,6 @@ inline YesNoType ToYesNoType(const char* szString)
// Loads a string-table from a Excel XML Spreadsheet file. // Loads a string-table from a Excel XML Spreadsheet file.
bool CLocalizedStringsManager::DoLoadExcelXmlSpreadsheet(const char* sFileName, uint8 nTagID, bool bReload) bool CLocalizedStringsManager::DoLoadExcelXmlSpreadsheet(const char* sFileName, uint8 nTagID, bool bReload)
{ {
LOADING_TIME_PROFILE_SECTION_ARGS(sFileName)
if (!m_pLanguage) if (!m_pLanguage)
{ {
return false; return false;

@ -397,7 +397,6 @@ void CLog::LogV(const ELogType type, [[maybe_unused]]int flags, const char* szFo
} }
FUNCTION_PROFILER(GetISystem(), PROFILE_SYSTEM); FUNCTION_PROFILER(GetISystem(), PROFILE_SYSTEM);
LOADING_TIME_PROFILE_SECTION(GetISystem());
bool bfile = false, bconsole = false; bool bfile = false, bconsole = false;
const char* szCommand = szFormat; const char* szCommand = szFormat;
@ -573,8 +572,6 @@ void CLog::LogPlus(const char* szFormat, ...)
return; return;
} }
LOADING_TIME_PROFILE_SECTION(GetISystem());
if (!szFormat) if (!szFormat)
{ {
return; return;
@ -1187,7 +1184,6 @@ void CLog::LogToFile(const char* szFormat, ...)
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
void CLog::CreateBackupFile() const void CLog::CreateBackupFile() const
{ {
LOADING_TIME_PROFILE_SECTION;
if (!m_backupLogs) if (!m_backupLogs)
{ {
return; return;

@ -1044,15 +1044,12 @@ IXmlUtils* CSystem::GetXmlUtils()
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
XmlNodeRef CSystem::LoadXmlFromFile(const char* sFilename, bool bReuseStrings) XmlNodeRef CSystem::LoadXmlFromFile(const char* sFilename, bool bReuseStrings)
{ {
LOADING_TIME_PROFILE_SECTION_ARGS(sFilename);
return m_pXMLUtils->LoadXmlFromFile(sFilename, bReuseStrings); return m_pXMLUtils->LoadXmlFromFile(sFilename, bReuseStrings);
} }
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
XmlNodeRef CSystem::LoadXmlFromBuffer(const char* buffer, size_t size, bool bReuseStrings, bool bSuppressWarnings) XmlNodeRef CSystem::LoadXmlFromBuffer(const char* buffer, size_t size, bool bReuseStrings, bool bSuppressWarnings)
{ {
LOADING_TIME_PROFILE_SECTION
return m_pXMLUtils->LoadXmlFromBuffer(buffer, size, bReuseStrings, bSuppressWarnings); return m_pXMLUtils->LoadXmlFromBuffer(buffer, size, bReuseStrings, bSuppressWarnings);
} }

@ -432,8 +432,6 @@ AZStd::unique_ptr<AZ::DynamicModuleHandle> CSystem::LoadDynamiclibrary(const cha
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
AZStd::unique_ptr<AZ::DynamicModuleHandle> CSystem::LoadDLL(const char* dllName) AZStd::unique_ptr<AZ::DynamicModuleHandle> CSystem::LoadDLL(const char* dllName)
{ {
LOADING_TIME_PROFILE_SECTION(GetISystem());
AZ_TracePrintf(AZ_TRACE_SYSTEM_WINDOW, "Loading DLL: %s", dllName); AZ_TracePrintf(AZ_TRACE_SYSTEM_WINDOW, "Loading DLL: %s", dllName);
AZStd::unique_ptr<AZ::DynamicModuleHandle> handle = LoadDynamiclibrary(dllName); AZStd::unique_ptr<AZ::DynamicModuleHandle> handle = LoadDynamiclibrary(dllName);
@ -612,8 +610,6 @@ AZStd::wstring GetErrorStringUnsupportedGPU(const char* gpuName, unsigned int gp
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
bool CSystem::InitConsole() bool CSystem::InitConsole()
{ {
LOADING_TIME_PROFILE_SECTION(GetISystem());
if (m_env.pConsole) if (m_env.pConsole)
{ {
m_env.pConsole->Init(this); m_env.pConsole->Init(this);
@ -662,7 +658,6 @@ ICVar* CSystem::attachVariable (const char* szVarName, int* pContainer, const ch
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
bool CSystem::InitFileSystem() bool CSystem::InitFileSystem()
{ {
LOADING_TIME_PROFILE_SECTION;
using namespace AzFramework::AssetSystem; using namespace AzFramework::AssetSystem;
if (m_pUserCallback) if (m_pUserCallback)
@ -748,11 +743,8 @@ void CSystem::ShutdownFileSystem()
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
bool CSystem::InitFileSystem_LoadEngineFolders(const SSystemInitParams&) bool CSystem::InitFileSystem_LoadEngineFolders(const SSystemInitParams&)
{ {
LOADING_TIME_PROFILE_SECTION; LoadConfiguration(m_systemConfigName.c_str());
{ AZ_Printf(AZ_TRACE_SYSTEM_WINDOW, "Loading system configuration from %s...", m_systemConfigName.c_str());
LoadConfiguration(m_systemConfigName.c_str());
AZ_Printf(AZ_TRACE_SYSTEM_WINDOW, "Loading system configuration from %s...", m_systemConfigName.c_str());
}
#if defined(AZ_PLATFORM_ANDROID) #if defined(AZ_PLATFORM_ANDROID)
AZ::Android::Utils::SetLoadFilesToMemory(m_sys_load_files_to_memory->GetString()); AZ::Android::Utils::SetLoadFilesToMemory(m_sys_load_files_to_memory->GetString());
@ -783,8 +775,6 @@ bool CSystem::InitFileSystem_LoadEngineFolders(const SSystemInitParams&)
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
bool CSystem::InitAudioSystem(const SSystemInitParams& initParams) bool CSystem::InitAudioSystem(const SSystemInitParams& initParams)
{ {
LOADING_TIME_PROFILE_SECTION(GetISystem());
if (!Audio::Gem::AudioSystemGemRequestBus::HasHandlers()) if (!Audio::Gem::AudioSystemGemRequestBus::HasHandlers())
{ {
// AudioSystem Gem has not been enabled for this project. // AudioSystem Gem has not been enabled for this project.
@ -826,8 +816,6 @@ bool CSystem::InitAudioSystem(const SSystemInitParams& initParams)
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
bool CSystem::InitVTuneProfiler() bool CSystem::InitVTuneProfiler()
{ {
LOADING_TIME_PROFILE_SECTION(GetISystem());
#ifdef PROFILE_WITH_VTUNE #ifdef PROFILE_WITH_VTUNE
WIN_HMODULE hModule = LoadDLL("VTuneApi.dll"); WIN_HMODULE hModule = LoadDLL("VTuneApi.dll");
@ -855,7 +843,6 @@ bool CSystem::InitVTuneProfiler()
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
void CSystem::InitLocalization() void CSystem::InitLocalization()
{ {
LOADING_TIME_PROFILE_SECTION(GetISystem());
// Set the localization folder // Set the localization folder
ICVar* pCVar = m_env.pConsole != 0 ? m_env.pConsole->GetCVar("sys_localization_folder") : 0; ICVar* pCVar = m_env.pConsole != 0 ? m_env.pConsole->GetCVar("sys_localization_folder") : 0;
if (pCVar) if (pCVar)
@ -917,8 +904,6 @@ void CSystem::OpenBasicPaks()
} }
bBasicPaksLoaded = true; bBasicPaksLoaded = true;
LOADING_TIME_PROFILE_SECTION;
// open pak files // open pak files
constexpr AZStd::string_view paksFolder = "@assets@/*.pak"; // (@assets@ assumed) constexpr AZStd::string_view paksFolder = "@assets@/*.pak"; // (@assets@ assumed)
m_env.pCryPak->OpenPacks(paksFolder); m_env.pCryPak->OpenPacks(paksFolder);
@ -1153,8 +1138,6 @@ bool CSystem::Init(const SSystemInitParams& startupParams)
gEnv = &m_env; gEnv = &m_env;
} }
LOADING_TIME_PROFILE_SECTION;
SetSystemGlobalState(ESYSTEM_GLOBAL_STATE_INIT); SetSystemGlobalState(ESYSTEM_GLOBAL_STATE_INIT);
gEnv->mMainThreadId = GetCurrentThreadId(); //Set this ASAP on startup gEnv->mMainThreadId = GetCurrentThreadId(); //Set this ASAP on startup

@ -1675,8 +1675,6 @@ XmlNodeRef XmlParserImp::ParseBuffer(const char* buffer, size_t bufLen, XmlStrin
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
XmlNodeRef XmlParserImp::ParseFile(const char* filename, XmlString& errorString, bool bCleanPools) XmlNodeRef XmlParserImp::ParseFile(const char* filename, XmlString& errorString, bool bCleanPools)
{ {
LOADING_TIME_PROFILE_SECTION(GetISystem());
if (!filename) if (!filename)
{ {
return 0; return 0;
@ -1739,8 +1737,6 @@ XmlNodeRef XmlParserImp::ParseFile(const char* filename, XmlString& errorString,
if (g_bEnableBinaryXmlLoading) if (g_bEnableBinaryXmlLoading)
{ {
LOADING_TIME_PROFILE_SECTION_NAMED("XMLBinaryReader::Parse");
XMLBinary::XMLBinaryReader reader; XMLBinary::XMLBinaryReader reader;
XMLBinary::XMLBinaryReader::EResult result; XMLBinary::XMLBinaryReader::EResult result;
root = reader.LoadFromBuffer(XMLBinary::XMLBinaryReader::eBufferMemoryHandling_TakeOwnership, pFileContents, fileSize, result); root = reader.LoadFromBuffer(XMLBinary::XMLBinaryReader::eBufferMemoryHandling_TakeOwnership, pFileContents, fileSize, result);

Loading…
Cancel
Save