//===========================================================================//
// File:	profile .hpp                                                        //
// Project: MUNGA           Brick: none  				                          //
// Contents: Bit definitions for logic analyser profiling of routines        //
//---------------------------------------------------------------------------//
//   Date    Who  Modification                                               //
// --------  ---  ---------------------------------------------------------- //
// 06/01/95  GAC  Initial coding.                                            //
//---------------------------------------------------------------------------//
// Copyright (C) 1995, Virtual World Entertainment, Inc. All Rights reserved //
//                      PROPRIETARY AND CONFIDENTIAL                         //
//===========================================================================//

#if !defined(PROFILE_HPP)
#	define PROFILE_HPP

#	if !defined(CLEAN_BUILD)
#		define CLEAN_BUILD 0
#	endif

#	if DEBUG_LEVEL>=3
#		define USE_PROFILE_ANALYSIS		// Enables trace activity
//#		define USE_TIME_ANALYSIS			// Enables trace time statistics
//#		define USE_TIME_LOG					// Enables logging functions
//#		define USE_FPU_ANALYSIS				// Enables entity FPU checks
//#		define USE_MEMORY_ANALYSIS			// Enables heap statistics
#	elif DEBUG_LEVEL==2
#		define USE_PROFILE_ANALYSIS		// Enables trace activity
//#		define USE_TIME_ANALYSIS			// Enables trace time statistics
//#		define USE_TIME_LOG					// Enables logging functions
//#		define USE_FPU_ANALYSIS				// Enables entity FPU checks
#		define USE_MEMORY_ANALYSIS			// Enables heap statistics
#	elif CLEAN_BUILD==0
//#		define USE_PROFILE_ANALYSIS		// Enables trace activity
#		define USE_TIME_ANALYSIS			// Enables trace time statistics
//#		define USE_TIME_LOG					// Enables logging functions
#		define USE_FPU_ANALYSIS				// Enables entity FPU checks
#		define USE_MEMORY_ANALYSIS			// Enables heap statistics
#	endif

#	if !defined(ANALYSIS_HPP)
#		include "analysis.hpp"
#	endif

	//*******************************************************************//
	//*******************************************************************//
	//                           IMPORTANT!!!                            //
	// Remember that trace numbers go from 0 to 11, that's all you get.  //
	//*******************************************************************//
	//*******************************************************************//

	//
	// ---Place enabled defines below  ----
	//

#	if defined(USE_PROFILE_ANALYSIS) || defined(USE_TIME_ANALYSIS)
		#define  ANALYSIS_FOREGROUND_PROCESSING			0
		#define	TRACE_0 "Foreground Processing"

		#define  ANALYSIS_UPDATE_MANAGER						1
		#define	TRACE_1 "Update Manager"

		#define  ANALYSIS_UPDATE_REPLICANTS					2
		#define	TRACE_2 "Update Replicants"

		#define	ANALYSIS_SEND_PACKET							3
		#define	TRACE_3 "Send Packet"

		#define	ANALYSIS_RENDERER_MANAGER					4
		#define	TRACE_4 "Renderer Manager"

		#define	ANALYSIS_VIDEO_EXECUTE_IMPLEMENTATION	5
		#define  ANALYSIS_VIDEO_FIRST_FRAME_DONE        5
		#define	ANALYSIS_VIDEO_RENDERER_FRAME_DONE		5
		#define	ANALYSIS_VIDEO_BECOME_UNINTERESTING 	5
		#define	TRACE_5 "Video Renderer"

		#define	ANALYSIS_VIDEO_BATCH_FLUSH					6
		#define	TRACE_6 "Video Batch Flush"

		#define	ANALYSIS_AUDIO_RENDERER						7
		#define	TRACE_7 "Audio Renderer"

		#define	ANALYSIS_GAUGE_RENDERER						8
		#define	TRACE_8 "Gauge Renderer"

		#define	ANALYSIS_SCREEN_COPY							9
		#define	TRACE_9 "Gauge Screen Copy"

		#define  ANALYSIS_PROCESS_EVENT						10
		#define	TRACE_10 "Process Event"

		#define	ANALYSIS_ROUTE_PACKET						11
		#define	TRACE_11 "Route Packet"

		//
		// Unused definitions
		//
/*
		#define  ANALYSIS_UPDATE_MASTERS				3
		#define  ANALYSIS_EXECUTE_ENTITY				4
		#define  ANALYSIS_PERFORM_ENTITY				5
		#define  ANALYSIS_PERFORM_SUBSYSTEMS		6
		#define  ANALYSIS_EXECUTE_WATCHERS			7
		#define	ANALYSIS_JOINT_PERFORMANCE			8
		#define	ANALYSIS_CHECK_BUFFERS				11
		#define 	ANALYSIS_CALL_NETNUB					6
		#define	ANALYSIS_APP_MGR						11
		#define  ANALYSIS_COMPLETE_CYCLES			3
		#define	ANALYSIS_DEATH_ROW					4
		#define	ANALYSIS_APP_INITIALIZE				7
		#define	ANALYSIS_INTEREST_MANAGER			8
		#define	ANALYSIS_LOAD_SOUNDBANK				9
		#define	ANALYSIS_WAIT_FOR_DROP				9

		//
		// Defines for profiling the video system
		// If you want to see all video activity on the same trace, put all the
		// defines marked with a * on the same trace and turn the rest off.
		// The indenting below shows how the calls are nested, to get sensable output never
		// put a call and one of it's nested children on the same trace.
		//
		#define	ANALYSIS_VIDEO_EXECUTE_IMPLEMENTATION	9  // * Video renderer execute implimentation running.
		#define		ANALYSIS_VIDEO_PICKPOINT				9	// Call to the RapidSectPixel or SectPixel
		#define		ANALYSIS_VIDEO_RENDERERABLES			9	// All calls to video renderable execute methods
		#define			ANALYSIS_VIDEO_MORPH_SEND			9	// A call to MorphObject in ChildMorphRenderable
		#define  ANALYSIS_VIDEO_FIRST_FRAME_DONE        9	// * A call to dpl_DrawSceneComplete at the end of Video execute loop
		#define	ANALYSIS_VIDEO_BATCH_FLUSH					9	// * Set whenever dpl_FlushArticulations is called
		#define	ANALYSIS_VIDEO_RENDERER_FRAME_DONE		9	// * Set whenever we check to see if a frame is done
		#define	ANALYSIS_VIDEO_BECOME_INTERESTING 		9	// * video renderer become interesting processes.
		#define		ANALYSIS_VIDEO_LOAD_OBJECT				9	// load object in default MakeEntityRenderables
		#define  	ANALYSIS_VIDEO_CONSTRUCT_ROOT			9	// root renderable in default MakeEntityRenderables
		#define			ANALYSIS_VIDEO_NEW_DCS				9	// dpl_NewDCS call in RootRenderable constructor
		#define			ANALYSIS_VIDEO_NEW_INSTANCE		9	// dpl_NewINSTANCE call in RootRenderable constructor
		#define			ANALYSIS_VIDEO_FLUSH_INSTANCE		9	// dpl_FlushInstance call in RootRenderable constructor
		#define			ANALYSIS_VIDEO_ADD_DCS_TO_SCENE	9	// dpl_AddDCSToScene call in RootRenderable constructor
		#define			ANALYSIS_VIDEO_FLUSH_DCS			9	// dpl_FlushDCS call in RootRenderable constructor
		#define	ANALYSIS_VIDEO_BECOME_UNINTERESTING 	9	// * Marks video renderer become uninteresting processes.
*/
																		// without changes to asmpkt.asm!
#	endif

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Macro definitions ... these make sure that profile.hpp is not forgotten
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

//~~~~~~~~~~~~~~~~~~~~~~~~~ Application Profiling ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

#if defined(ANALYSIS_FOREGROUND_PROCESSING)
#	define SET_ANALYSIS_FOREGROUND_PROCESSING()\
		Set_Analysis(ANALYSIS_FOREGROUND_PROCESSING)
#	define CLEAR_ANALYSIS_FOREGROUND_PROCESSING()\
		Clear_Analysis(ANALYSIS_FOREGROUND_PROCESSING)
#else
#	define SET_ANALYSIS_FOREGROUND_PROCESSING()
#	define CLEAR_ANALYSIS_FOREGROUND_PROCESSING()
#endif

#if defined(ANALYSIS_RENDERER_MANAGER)
#	define SET_ANALYSIS_RENDERER_MANAGER()\
		Set_Analysis(ANALYSIS_RENDERER_MANAGER)
#	define CLEAR_ANALYSIS_RENDERER_MANAGER()\
		Clear_Analysis(ANALYSIS_RENDERER_MANAGER)
#else
#	define SET_ANALYSIS_RENDERER_MANAGER()
#	define CLEAR_ANALYSIS_RENDERER_MANAGER()
#endif

#if defined(ANALYSIS_PROCESS_EVENT)
#	define SET_ANALYSIS_PROCESS_EVENT()\
		Set_Analysis(ANALYSIS_PROCESS_EVENT)
#	define CLEAR_ANALYSIS_PROCESS_EVENT()\
		Clear_Analysis(ANALYSIS_PROCESS_EVENT)
#else
#	define SET_ANALYSIS_PROCESS_EVENT()
#	define CLEAR_ANALYSIS_PROCESS_EVENT()
#endif

#if defined(ANALYSIS_COMPLETE_CYCLES)
#	define SET_ANALYSIS_COMPLETE_CYCLES()\
		Set_Analysis(ANALYSIS_COMPLETE_CYCLES)
#	define CLEAR_ANALYSIS_COMPLETE_CYCLES()\
		Clear_Analysis(ANALYSIS_COMPLETE_CYCLES)
#else
#	define SET_ANALYSIS_COMPLETE_CYCLES()
#	define CLEAR_ANALYSIS_COMPLETE_CYCLES()
#endif

#if defined(ANALYSIS_DEATH_ROW)
#	define SET_ANALYSIS_DEATH_ROW()\
		Set_Analysis(ANALYSIS_DEATH_ROW)
#	define CLEAR_ANALYSIS_DEATH_ROW()\
		Clear_Analysis(ANALYSIS_DEATH_ROW)
#else
#	define SET_ANALYSIS_DEATH_ROW()
#	define CLEAR_ANALYSIS_DEATH_ROW()
#endif

#if defined(ANALYSIS_APP_MGR)
#	define SET_ANALYSIS_APP_MGR()\
		Set_Analysis(ANALYSIS_APP_MGR)
#	define CLEAR_ANALYSIS_APP_MGR()\
		Clear_Analysis(ANALYSIS_APP_MGR)
#else
#	define SET_ANALYSIS_APP_MGR()
#	define CLEAR_ANALYSIS_APP_MGR()
#endif

//~~~~~~~~~~~~~~~~~~~~~~~~~~ Network Profiling ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

#if defined(ANALYSIS_ROUTE_PACKET)
#	define SET_ANALYSIS_ROUTE_PACKET()\
		Set_Analysis(ANALYSIS_ROUTE_PACKET)
#	define CLEAR_ANALYSIS_ROUTE_PACKET()\
		Clear_Analysis(ANALYSIS_ROUTE_PACKET)
#else
#	define SET_ANALYSIS_ROUTE_PACKET()
#	define CLEAR_ANALYSIS_ROUTE_PACKET()
#endif

#if defined(ANALYSIS_SEND_PACKET)
#	define SET_ANALYSIS_SEND_PACKET()\
		Set_Analysis(ANALYSIS_SEND_PACKET)
#	define CLEAR_ANALYSIS_SEND_PACKET()\
		Clear_Analysis(ANALYSIS_SEND_PACKET)
#else
#	define SET_ANALYSIS_SEND_PACKET()
#	define CLEAR_ANALYSIS_SEND_PACKET()
#endif

#if defined(ANALYSIS_CHECK_BUFFERS)
#	define SET_ANALYSIS_CHECK_BUFFERS()\
		Set_Analysis(ANALYSIS_CHECK_BUFFERS)
#	define CLEAR_ANALYSIS_CHECK_BUFFERS()\
		Clear_Analysis(ANALYSIS_CHECK_BUFFERS)
#else
#	define SET_ANALYSIS_CHECK_BUFFERS()
#	define CLEAR_ANALYSIS_CHECK_BUFFERS()
#endif

#if defined(ANALYSIS_CALL_NETNUB)
#	define SET_ANALYSIS_CALL_NETNUB()\
		Set_Analysis(ANALYSIS_CALL_NETNUB)
#	define CLEAR_ANALYSIS_CALL_NETNUB()\
		Clear_Analysis(ANALYSIS_CALL_NETNUB)
#else
#	define SET_ANALYSIS_CALL_NETNUB()
#	define CLEAR_ANALYSIS_CALL_NETNUB()
#endif

//~~~~~~~~~~~~~~~~~~~~~~~~~~ Entity Profiling ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

#if defined(ANALYSIS_UPDATE_MANAGER)
#	define SET_ANALYSIS_UPDATE_MANAGER()\
		Set_Analysis(ANALYSIS_UPDATE_MANAGER)
#	define CLEAR_ANALYSIS_UPDATE_MANAGER()\
		Clear_Analysis(ANALYSIS_UPDATE_MANAGER)
#else
#	define SET_ANALYSIS_UPDATE_MANAGER()
#	define CLEAR_ANALYSIS_UPDATE_MANAGER()
#endif

#if defined(ANALYSIS_UPDATE_REPLICANTS)
#	define SET_ANALYSIS_UPDATE_REPLICANTS()\
		Set_Analysis(ANALYSIS_UPDATE_REPLICANTS)
#	define CLEAR_ANALYSIS_UPDATE_REPLICANTS()\
		Clear_Analysis(ANALYSIS_UPDATE_REPLICANTS)
#else
#	define SET_ANALYSIS_UPDATE_REPLICANTS()
#	define CLEAR_ANALYSIS_UPDATE_REPLICANTS()
#endif

#if defined(ANALYSIS_UPDATE_MASTERS)
#	define SET_ANALYSIS_UPDATE_MASTERS()\
		Set_Analysis(ANALYSIS_UPDATE_MASTERS)
#	define CLEAR_ANALYSIS_UPDATE_MASTERS()\
		Clear_Analysis(ANALYSIS_UPDATE_MASTERS)
#else
#	define SET_ANALYSIS_UPDATE_MASTERS()
#	define CLEAR_ANALYSIS_UPDATE_MASTERS()
#endif

#if defined(ANALYSIS_EXECUTE_ENTITY)
#	define SET_ANALYSIS_EXECUTE_ENTITY()\
		Set_Analysis(ANALYSIS_EXECUTE_ENTITY)
#	define CLEAR_ANALYSIS_EXECUTE_ENTITY()\
		Clear_Analysis(ANALYSIS_EXECUTE_ENTITY)
#else
#	define SET_ANALYSIS_EXECUTE_ENTITY()
#	define CLEAR_ANALYSIS_EXECUTE_ENTITY()
#endif

#if defined(ANALYSIS_PERFORM_ENTITY)
#	define SET_ANALYSIS_PERFORM_ENTITY()\
		Set_Analysis(ANALYSIS_PERFORM_ENTITY)
#	define CLEAR_ANALYSIS_PERFORM_ENTITY()\
		Clear_Analysis(ANALYSIS_PERFORM_ENTITY)
#else
#	define SET_ANALYSIS_PERFORM_ENTITY()
#	define CLEAR_ANALYSIS_PERFORM_ENTITY()
#endif

#if defined(ANALYSIS_PERFORM_SUBSYSTEMS)
#	define SET_ANALYSIS_PERFORM_SUBSYSTEMS()\
		Set_Analysis(ANALYSIS_PERFORM_SUBSYSTEMS)
#	define CLEAR_ANALYSIS_PERFORM_SUBSYSTEMS()\
		Clear_Analysis(ANALYSIS_PERFORM_SUBSYSTEMS)
#else
#	define SET_ANALYSIS_PERFORM_SUBSYSTEMS()
#	define CLEAR_ANALYSIS_PERFORM_SUBSYSTEMS()
#endif

#if defined(ANALYSIS_EXECUTE_WATCHERS)
#	define SET_ANALYSIS_EXECUTE_WATCHERS()\
		Set_Analysis(ANALYSIS_EXECUTE_WATCHERS)
#	define CLEAR_ANALYSIS_EXECUTE_WATCHERS()\
		Clear_Analysis(ANALYSIS_EXECUTE_WATCHERS)
#else
#	define SET_ANALYSIS_EXECUTE_WATCHERS()
#	define CLEAR_ANALYSIS_EXECUTE_WATCHERS()
#endif

#if defined(ANALYSIS_JOINT_PERFORMANCE)
#	define SET_ANALYSIS_JOINT_PERFORMANCE()\
		Set_Analysis(ANALYSIS_JOINT_PERFORMANCE)
#	define CLEAR_ANALYSIS_JOINT_PERFORMANCE()\
		Clear_Analysis(ANALYSIS_JOINT_PERFORMANCE)
#else
#	define SET_ANALYSIS_JOINT_PERFORMANCE()
#	define CLEAR_ANALYSIS_JOINT_PERFORMANCE()
#endif

//~~~~~~~~~~~~~~~~~~~~~~ Video Renderer Profiling ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

#if defined(ANALYSIS_VIDEO_NEW_INSTANCE)
#	define SET_ANALYSIS_VIDEO_NEW_INSTANCE()\
		Set_Analysis(ANALYSIS_VIDEO_NEW_INSTANCE)
#	define CLEAR_ANALYSIS_VIDEO_NEW_INSTANCE()\
		Clear_Analysis(ANALYSIS_VIDEO_NEW_INSTANCE)
#else
#	define SET_ANALYSIS_VIDEO_NEW_INSTANCE()
#	define CLEAR_ANALYSIS_VIDEO_NEW_INSTANCE()
#endif

#if defined(ANALYSIS_VIDEO_NEW_DCS)
#	define SET_ANALYSIS_VIDEO_NEW_DCS()\
		Set_Analysis(ANALYSIS_VIDEO_NEW_DCS)
#	define CLEAR_ANALYSIS_VIDEO_NEW_DCS()\
		Clear_Analysis(ANALYSIS_VIDEO_NEW_DCS)
#else
#	define SET_ANALYSIS_VIDEO_NEW_DCS()
#	define CLEAR_ANALYSIS_VIDEO_NEW_DCS()
#endif

#if defined(ANALYSIS_VIDEO_FLUSH_INSTANCE)
#	define SET_ANALYSIS_VIDEO_FLUSH_INSTANCE()\
		Set_Analysis(ANALYSIS_VIDEO_FLUSH_INSTANCE)
#	define CLEAR_ANALYSIS_VIDEO_FLUSH_INSTANCE()\
		Clear_Analysis(ANALYSIS_VIDEO_FLUSH_INSTANCE)
#else
#	define SET_ANALYSIS_VIDEO_FLUSH_INSTANCE()
#	define CLEAR_ANALYSIS_VIDEO_FLUSH_INSTANCE()
#endif

#if defined(ANALYSIS_VIDEO_ADD_DCS_TO_SCENE)
#	define SET_ANALYSIS_VIDEO_ADD_DCS_TO_SCENE()\
		Set_Analysis(ANALYSIS_VIDEO_ADD_DCS_TO_SCENE)
#	define CLEAR_ANALYSIS_VIDEO_ADD_DCS_TO_SCENE()\
		Clear_Analysis(ANALYSIS_VIDEO_ADD_DCS_TO_SCENE)
#else
#	define SET_ANALYSIS_VIDEO_ADD_DCS_TO_SCENE()
#	define CLEAR_ANALYSIS_VIDEO_ADD_DCS_TO_SCENE()
#endif

#if defined(ANALYSIS_VIDEO_FLUSH_DCS)
#	define SET_ANALYSIS_VIDEO_FLUSH_DCS()\
		Set_Analysis(ANALYSIS_VIDEO_FLUSH_DCS)
#	define CLEAR_ANALYSIS_VIDEO_FLUSH_DCS()\
		Clear_Analysis(ANALYSIS_VIDEO_FLUSH_DCS)
#else
#	define SET_ANALYSIS_VIDEO_FLUSH_DCS()
#	define CLEAR_ANALYSIS_VIDEO_FLUSH_DCS()
#endif

#if defined(ANALYSIS_VIDEO_CONSTRUCT_ROOT)
#	define SET_ANALYSIS_VIDEO_CONSTRUCT_ROOT()\
		Set_Analysis(ANALYSIS_VIDEO_CONSTRUCT_ROOT)
#	define CLEAR_ANALYSIS_VIDEO_CONSTRUCT_ROOT()\
		Clear_Analysis(ANALYSIS_VIDEO_CONSTRUCT_ROOT)
#else
#	define SET_ANALYSIS_VIDEO_CONSTRUCT_ROOT()
#	define CLEAR_ANALYSIS_VIDEO_CONSTRUCT_ROOT()
#endif

#if defined(ANALYSIS_VIDEO_LOAD_OBJECT)
#	define SET_ANALYSIS_VIDEO_LOAD_OBJECT()\
		Set_Analysis(ANALYSIS_VIDEO_LOAD_OBJECT)
#	define CLEAR_ANALYSIS_VIDEO_LOAD_OBJECT()\
		Clear_Analysis(ANALYSIS_VIDEO_LOAD_OBJECT)
#else
#	define SET_ANALYSIS_VIDEO_LOAD_OBJECT()
#	define CLEAR_ANALYSIS_VIDEO_LOAD_OBJECT()
#endif

#if defined(ANALYSIS_VIDEO_FIRST_FRAME_DONE)
#	define SET_ANALYSIS_VIDEO_FIRST_FRAME_DONE()\
		Set_Analysis(ANALYSIS_VIDEO_FIRST_FRAME_DONE)
#	define CLEAR_ANALYSIS_VIDEO_FIRST_FRAME_DONE()\
		Clear_Analysis(ANALYSIS_VIDEO_FIRST_FRAME_DONE)
#else
#	define SET_ANALYSIS_VIDEO_FIRST_FRAME_DONE()
#	define CLEAR_ANALYSIS_VIDEO_FIRST_FRAME_DONE()
#endif

#if defined(ANALYSIS_VIDEO_MORPH_SEND)
#	define SET_ANALYSIS_VIDEO_MORPH_SEND()\
		Set_Analysis(ANALYSIS_VIDEO_MORPH_SEND)
#	define CLEAR_ANALYSIS_VIDEO_MORPH_SEND()\
		Clear_Analysis(ANALYSIS_VIDEO_MORPH_SEND)
#else
#	define SET_ANALYSIS_VIDEO_MORPH_SEND()
#	define CLEAR_ANALYSIS_VIDEO_MORPH_SEND()
#endif

#if defined(ANALYSIS_VIDEO_EXECUTE_IMPLEMENTATION)
#	define SET_ANALYSIS_VIDEO_EXECUTE_IMPLEMENTATION()\
		Set_Analysis(ANALYSIS_VIDEO_EXECUTE_IMPLEMENTATION)
#	define CLEAR_ANALYSIS_VIDEO_EXECUTE_IMPLEMENTATION()\
		Clear_Analysis(ANALYSIS_VIDEO_EXECUTE_IMPLEMENTATION)
#else
#	define SET_ANALYSIS_VIDEO_EXECUTE_IMPLEMENTATION()
#	define CLEAR_ANALYSIS_VIDEO_EXECUTE_IMPLEMENTATION()
#endif

#if defined(ANALYSIS_VIDEO_RENDERER_FRAME_DONE)
#	define SET_ANALYSIS_VIDEO_RENDERER_FRAME_DONE()\
		Set_Analysis(ANALYSIS_VIDEO_RENDERER_FRAME_DONE)
#	define CLEAR_ANALYSIS_VIDEO_RENDERER_FRAME_DONE()\
		Clear_Analysis(ANALYSIS_VIDEO_RENDERER_FRAME_DONE)
#else
#	define SET_ANALYSIS_VIDEO_RENDERER_FRAME_DONE()
#	define CLEAR_ANALYSIS_VIDEO_RENDERER_FRAME_DONE()
#endif

#if defined(ANALYSIS_VIDEO_BECOME_INTERESTING)
#	define SET_ANALYSIS_VIDEO_BECOME_INTERESTING()\
		Set_Analysis(ANALYSIS_VIDEO_BECOME_INTERESTING)
#	define CLEAR_ANALYSIS_VIDEO_BECOME_INTERESTING()\
		Clear_Analysis(ANALYSIS_VIDEO_BECOME_INTERESTING)
#else
#	define SET_ANALYSIS_VIDEO_BECOME_INTERESTING()
#	define CLEAR_ANALYSIS_VIDEO_BECOME_INTERESTING()
#endif

#if defined(ANALYSIS_VIDEO_BECOME_UNINTERESTING)
#	define SET_ANALYSIS_VIDEO_BECOME_UNINTERESTING()\
		Set_Analysis(ANALYSIS_VIDEO_BECOME_UNINTERESTING)
#	define CLEAR_ANALYSIS_VIDEO_BECOME_UNINTERESTING()\
		Clear_Analysis(ANALYSIS_VIDEO_BECOME_UNINTERESTING)
#else
#	define SET_ANALYSIS_VIDEO_BECOME_UNINTERESTING()
#	define CLEAR_ANALYSIS_VIDEO_BECOME_UNINTERESTING()
#endif

#if defined(ANALYSIS_VIDEO_RENDERERABLES)
#	define SET_ANALYSIS_VIDEO_RENDERERABLES()\
		Set_Analysis(ANALYSIS_VIDEO_RENDERERABLES)
#	define CLEAR_ANALYSIS_VIDEO_RENDERERABLES()\
		Clear_Analysis(ANALYSIS_VIDEO_RENDERERABLES)
#else
#	define SET_ANALYSIS_VIDEO_RENDERERABLES()
#	define CLEAR_ANALYSIS_VIDEO_RENDERERABLES()
#endif

#if defined(ANALYSIS_VIDEO_BATCH_FLUSH)
#	define SET_ANALYSIS_VIDEO_BATCH_FLUSH()\
		Set_Analysis(ANALYSIS_VIDEO_BATCH_FLUSH)
#	define CLEAR_ANALYSIS_VIDEO_BATCH_FLUSH()\
		Clear_Analysis(ANALYSIS_VIDEO_BATCH_FLUSH)
#else
#	define SET_ANALYSIS_VIDEO_BATCH_FLUSH()
#	define CLEAR_ANALYSIS_VIDEO_BATCH_FLUSH()
#endif

#if defined(ANALYSIS_VIDEO_PICKPOINT)
#	define SET_ANALYSIS_VIDEO_PICKPOINT()\
		Set_Analysis(ANALYSIS_VIDEO_PICKPOINT)
#	define CLEAR_ANALYSIS_VIDEO_PICKPOINT()\
		Clear_Analysis(ANALYSIS_VIDEO_PICKPOINT)
#else
#	define SET_ANALYSIS_VIDEO_PICKPOINT()
#	define CLEAR_ANALYSIS_VIDEO_PICKPOINT()
#endif

//~~~~~~~~~~~~~~~~~~~~~~ Audio Renderer Profiling ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

#if defined(ANALYSIS_AUDIO_RENDERER)
#	define SET_ANALYSIS_AUDIO_RENDERER()\
		Set_Analysis(ANALYSIS_AUDIO_RENDERER)
#	define CLEAR_ANALYSIS_AUDIO_RENDERER()\
		Clear_Analysis(ANALYSIS_AUDIO_RENDERER)
#else
#	define SET_ANALYSIS_AUDIO_RENDERER()
#	define CLEAR_ANALYSIS_AUDIO_RENDERER()
#endif

#if defined(ANALYSIS_AUDIO_RENDERER_MIDI)
#	define SET_ANALYSIS_AUDIO_RENDERER_MIDI()\
		Set_Analysis(ANALYSIS_AUDIO_RENDERER_MIDI)
#	define CLEAR_ANALYSIS_AUDIO_RENDERER_MIDI()\
		Clear_Analysis(ANALYSIS_AUDIO_RENDERER_MIDI)
#else
#	define SET_ANALYSIS_AUDIO_RENDERER_MIDI()
#	define CLEAR_ANALYSIS_AUDIO_RENDERER_MIDI()
#endif

//~~~~~~~~~~~~~~~~~~~~~~ Controls Manager Profiling ~~~~~~~~~~~~~~~~~~~~~~~~~~~

#if defined(ANALYSIS_RIO_ANALOG_REQUEST)
#	define SET_ANALYSIS_RIO_ANALOG_REQUEST()\
		Set_Analysis(ANALYSIS_RIO_ANALOG_REQUEST)
#	define CLEAR_ANALYSIS_RIO_ANALOG_REQUEST()\
		Clear_Analysis(ANALYSIS_RIO_ANALOG_REQUEST)
#else
#	define SET_ANALYSIS_RIO_ANALOG_REQUEST()
#	define CLEAR_ANALYSIS_RIO_ANALOG_REQUEST()
#endif

#if defined(ANALYSIS_RIO_PROCESS_EVENT)
#	define SET_ANALYSIS_RIO_PROCESS_EVENT()\
		Set_Analysis(ANALYSIS_RIO_PROCESS_EVENT)
#	define CLEAR_ANALYSIS_RIO_PROCESS_EVENT()\
		Clear_Analysis(ANALYSIS_RIO_PROCESS_EVENT)
#else
#	define SET_ANALYSIS_RIO_PROCESS_EVENT()
#	define CLEAR_ANALYSIS_RIO_PROCESS_EVENT()
#endif

#if defined(ANALYSIS_JOYSTICK)
#	define SET_ANALYSIS_JOYSTICK() Set_Analysis(ANALYSIS_JOYSTICK)
#	define CLEAR_ANALYSIS_JOYSTICK() Clear_Analysis(ANALYSIS_JOYSTICK)
#else
#	define SET_ANALYSIS_JOYSTICK()
#	define CLEAR_ANALYSIS_JOYSTICK()
#endif

#if defined(ANALYSIS_MOUSE)
#	define SET_ANALYSIS_MOUSE() Set_Analysis(ANALYSIS_MOUSE)
#	define CLEAR_ANALYSIS_MOUSE() Clear_Analysis(ANALYSIS_MOUSE)
#else
#	define SET_ANALYSIS_MOUSE()
#	define CLEAR_ANALYSIS_MOUSE()
#endif

#if defined(ANALYSIS_SCALAR_UPDATE)
#	define SET_ANALYSIS_SCALAR_UPDATE() Set_Analysis(ANALYSIS_SCALAR_UPDATE)
#	define CLEAR_ANALYSIS_SCALAR_UPDATE() Clear_Analysis(ANALYSIS_SCALAR_UPDATE)
#else
#	define SET_ANALYSIS_SCALAR_UPDATE()
#	define CLEAR_ANALYSIS_SCALAR_UPDATE()
#endif

#if defined(ANALYSIS_JOYSTICK_UPDATE)
#	define SET_ANALYSIS_JOYSTICK_UPDATE() Set_Analysis(ANALYSIS_JOYSTICK_UPDATE)
#	define CLEAR_ANALYSIS_JOYSTICK_UPDATE()\
		Clear_Analysis(ANALYSIS_JOYSTICK_UPDATE)
#else
#	define SET_ANALYSIS_JOYSTICK_UPDATE()
#	define CLEAR_ANALYSIS_JOYSTICK_UPDATE()
#endif

#if defined(ANALYSIS_KEYBOARD_UPDATE)
#	define SET_ANALYSIS_KEYBOARD_UPDATE() Set_Analysis(ANALYSIS_KEYBOARD_UPDATE)
#	define CLEAR_ANALYSIS_KEYBOARD_UPDATE()\
		Clear_Analysis(ANALYSIS_KEYBOARD_UPDATE)
#else
#	define SET_ANALYSIS_KEYBOARD_UPDATE()
#	define CLEAR_ANALYSIS_KEYBOARD_UPDATE()
#endif

#if defined(ANALYSIS_JOYSTICK_BUTTON_UPDATE)
#	define SET_ANALYSIS_JOYSTICK_BUTTON_UPDATE()\
		Set_Analysis(ANALYSIS_JOYSTICK_BUTTON_UPDATE)
#	define CLEAR_ANALYSIS_JOYSTICK_BUTTON_UPDATE()\
		Clear_Analysis(ANALYSIS_JOYSTICK_BUTTON_UPDATE)
#else
#	define SET_ANALYSIS_JOYSTICK_BUTTON_UPDATE()
#	define CLEAR_ANALYSIS_JOYSTICK_BUTTON_UPDATE()
#endif

#if defined(ANALYSIS_MOUSE_BUTTON_UPDATE)
#	define SET_ANALYSIS_MOUSE_BUTTON_UPDATE()\
		Set_Analysis(ANALYSIS_MOUSE_BUTTON_UPDATE)
#	define CLEAR_ANALYSIS_MOUSE_BUTTON_UPDATE()\
		Clear_Analysis(ANALYSIS_MOUSE_BUTTON_UPDATE)
#else
#	define SET_ANALYSIS_MOUSE_BUTTON_UPDATE()
#	define CLEAR_ANALYSIS_MOUSE_BUTTON_UPDATE()
#endif

#if defined(ANALYSIS_BACKGROUND_ROUTE_PACKET)
#	define SET_ANALYSIS_BACKGROUND_ROUTE_PACKET()\
		Set_Analysis(ANALYSIS_BACKGROUND_ROUTE_PACKET)
#	define CLEAR_ANALYSIS_BACKGROUND_ROUTE_PACKET()\
		Clear_Analysis(ANALYSIS_BACKGROUND_ROUTE_PACKET)
#else
#	define SET_ANALYSIS_BACKGROUND_ROUTE_PACKET()
#	define CLEAR_ANALYSIS_BACKGROUND_ROUTE_PACKET()
#endif

#if defined(ANALYSIS_RIO_DELETE_RIO)
#	define SET_ANALYSIS_RIO_DELETE_RIO()\
		Set_Analysis(ANALYSIS_RIO_DELETE_RIO)
#	define CLEAR_ANALYSIS_RIO_DELETE_RIO()\
		Clear_Analysis(ANALYSIS_RIO_DELETE_RIO)
#else
#	define SET_ANALYSIS_RIO_DELETE_RIO()
#	define CLEAR_ANALYSIS_RIO_DELETE_RIO()
#endif

#if defined(ANALYSIS_RIO_SEND_PACKET)
#	define SET_ANALYSIS_RIO_SEND_PACKET()\
		Set_Analysis(ANALYSIS_RIO_SEND_PACKET)
#	define CLEAR_ANALYSIS_RIO_SEND_PACKET()\
		Clear_Analysis(ANALYSIS_RIO_SEND_PACKET)
#else
#	define SET_ANALYSIS_RIO_SEND_PACKET()
#	define CLEAR_ANALYSIS_RIO_SEND_PACKET()
#endif

#if defined(ANALYSIS_RIO_RECEIVE_PACKET)
#	define SET_ANALYSIS_RIO_RECEIVE_PACKET()\
		Set_Analysis(ANALYSIS_RIO_RECEIVE_PACKET)
#	define CLEAR_ANALYSIS_RIO_RECEIVE_PACKET()\
		Clear_Analysis(ANALYSIS_RIO_RECEIVE_PACKET)
#else
#	define SET_ANALYSIS_RIO_RECEIVE_PACKET()
#	define CLEAR_ANALYSIS_RIO_RECEIVE_PACKET()
#endif

#if defined(ANALYSIS_RIO_ANALOG_UPDATE)
#	define SET_ANALYSIS_RIO_ANALOG_UPDATE()\
		Set_Analysis(ANALYSIS_RIO_ANALOG_UPDATE)
#	define CLEAR_ANALYSIS_RIO_ANALOG_UPDATE()\
		Clear_Analysis(ANALYSIS_RIO_ANALOG_UPDATE)
#else
#	define SET_ANALYSIS_RIO_ANALOG_UPDATE()
#	define CLEAR_ANALYSIS_RIO_ANALOG_UPDATE()
#endif

#if defined(ANALYSIS_RIO_MISC_REQUEST)
#	define SET_ANALYSIS_RIO_MISC_REQUEST()\
		Set_Analysis(ANALYSIS_RIO_MISC_REQUEST)
#	define CLEAR_ANALYSIS_RIO_MISC_REQUEST()\
		Clear_Analysis(ANALYSIS_RIO_MISC_REQUEST)
#else
#	define SET_ANALYSIS_RIO_MISC_REQUEST()
#	define CLEAR_ANALYSIS_RIO_MISC_REQUEST()
#endif

#if defined(ANALYSIS_RIO_RESET_STICK)
#	define SET_ANALYSIS_RIO_RESET_STICK()\
		Set_Analysis(ANALYSIS_RIO_RESET_STICK)
#	define CLEAR_ANALYSIS_RIO_RESET_STICK()\
		Clear_Analysis(ANALYSIS_RIO_RESET_STICK)
#else
#	define SET_ANALYSIS_RIO_RESET_STICK()
#	define CLEAR_ANALYSIS_RIO_RESET_STICK()
#endif

#if defined(ANALYSIS_PERFORM)
#	define SET_ANALYSIS_PERFORM() Set_Analysis(ANALYSIS_PERFORM)
#	define CLEAR_ANALYSIS_PERFORM() Clear_Analysis(ANALYSIS_PERFORM)
#else
#	define SET_ANALYSIS_PERFORM()
#	define CLEAR_ANALYSIS_PERFORM()
#endif

#if defined(ANALYSIS_APP_INITIALIZE)
#	define SET_ANALYSIS_APP_INITIALIZE() Set_Analysis(ANALYSIS_APP_INITIALIZE)
#	define CLEAR_ANALYSIS_APP_INITIALIZE() Clear_Analysis(ANALYSIS_APP_INITIALIZE)
#else
#	define SET_ANALYSIS_APP_INITIALIZE()
#	define CLEAR_ANALYSIS_APP_INITIALIZE()
#endif


#if defined(ANALYSIS_WAIT_FOR_DROP)
#	define SET_ANALYSIS_WAIT_FOR_DROP() Set_Analysis(ANALYSIS_WAIT_FOR_DROP)
#	define CLEAR_ANALYSIS_WAIT_FOR_DROP() Clear_Analysis(ANALYSIS_WAIT_FOR_DROP)
#else
#	define SET_ANALYSIS_WAIT_FOR_DROP()
#	define CLEAR_ANALYSIS_WAIT_FOR_DROP()
#endif

#if defined(ANALYSIS_GAUGE_RENDERER)
#	define SET_ANALYSIS_GAUGE_RENDERER() Set_Analysis(ANALYSIS_GAUGE_RENDERER)
#	define CLEAR_ANALYSIS_GAUGE_RENDERER()\
		Clear_Analysis(ANALYSIS_GAUGE_RENDERER)
#else
#	define SET_ANALYSIS_GAUGE_RENDERER()
#	define CLEAR_ANALYSIS_GAUGE_RENDERER()
#endif

#if defined(ANALYSIS_SCREEN_COPY)
#	define SET_ANALYSIS_SCREEN_COPY() Set_Analysis(ANALYSIS_SCREEN_COPY)
#	define CLEAR_ANALYSIS_SCREEN_COPY() Clear_Analysis(ANALYSIS_SCREEN_COPY)
#else
#	define SET_ANALYSIS_SCREEN_COPY()
#	define CLEAR_ANALYSIS_SCREEN_COPY()
#endif

#endif
