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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user