Removes VTUNE profiler hooks from Cry (#5291)

* Removes VTUNE profiler hooks from Cry

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* some more vtune cleanup

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-11-04 10:10:29 -07:00
committed by GitHub
parent 1470d97f58
commit 0b7bff79d3
7 changed files with 0 additions and 151 deletions
-56
View File
@@ -143,9 +143,6 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
#include <AzFramework/Input/Buses/Notifications/RawInputNotificationBus_Platform.h>
// To enable profiling with vtune (https://software.intel.com/en-us/intel-vtune-amplifier-xe), make sure the line below is not commented out
//#define PROFILE_WITH_VTUNE
#include <process.h>
#include <malloc.h>
#endif
@@ -154,10 +151,6 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
#include <AzFramework/IO/LocalFileIO.h>
// profilers api.
VTuneFunction VTResume = NULL;
VTuneFunction VTPause = NULL;
// Define global cvars.
SSystemCVars g_cvars;
@@ -697,31 +690,6 @@ bool CSystem::UpdatePreTickBus(int updateFlags, int nPauseMode)
m_bPaused = false;
}
#ifdef PROFILE_WITH_VTUNE
if (m_bInDevMode)
{
if (VTPause != NULL && VTResume != NULL)
{
static bool bVtunePaused = true;
const AzFramework::InputChannel* inputChannelScrollLock = AzFramework::InputChannelRequests::FindInputChannel(AzFramework::InputDeviceKeyboard::Key::WindowsSystemScrollLock);
const bool bPaused = (inputChannelScrollLock ? inputChannelScrollLock->IsActive() : false);
{
if (bVtunePaused && !bPaused)
{
GetIProfilingSystem()->VTuneResume();
}
if (!bVtunePaused && bPaused)
{
GetIProfilingSystem()->VTunePause();
}
bVtunePaused = bPaused;
}
}
}
#endif //PROFILE_WITH_VTUNE
#ifndef EXCLUDE_UPDATE_ON_CONSOLE
if (m_bIgnoreUpdates)
{
@@ -1255,30 +1223,6 @@ CPNoise3* CSystem::GetNoiseGen()
return &m_pNoiseGen;
}
//////////////////////////////////////////////////////////////////////////
void CProfilingSystem::VTuneResume()
{
#ifdef PROFILE_WITH_VTUNE
if (VTResume)
{
CryLogAlways("VTune Resume");
VTResume();
}
#endif
}
//////////////////////////////////////////////////////////////////////////
void CProfilingSystem::VTunePause()
{
#ifdef PROFILE_WITH_VTUNE
if (VTPause)
{
VTPause();
CryLogAlways("VTune Pause");
}
#endif
}
//////////////////////////////////////////////////////////////////////
void CSystem::OnLanguageCVarChanged(ICVar* language)
{