Deprecate profiler categories based on global enum

(to be supplanted by registered budgets in the future)

Signed-off-by: Jeremy Ong <jcong@amazon.com>
This commit is contained in:
Jeremy Ong
2021-08-17 12:10:57 -06:00
parent d15d40fec6
commit df9b4d4a2f
274 changed files with 1435 additions and 1965 deletions
@@ -706,7 +706,7 @@ namespace ScriptCanvasEditor
bool savedSuccess;
{
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::ScriptCanvas, "ScriptCanvasAssetHandler::SaveAssetData");
AZ_PROFILE_SCOPE(ScriptCanvas, "ScriptCanvasAssetHandler::SaveAssetData");
ScriptCanvasMemoryAsset cloneAsset;
m_sourceAsset->CloneTo(cloneAsset);
@@ -716,14 +716,14 @@ namespace ScriptCanvasEditor
stream.Close();
if (savedSuccess)
{
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::ScriptCanvas, "AssetTracker::SaveAssetPostSourceControl : TempToTargetFileReplacement");
AZ_PROFILE_SCOPE(ScriptCanvas, "AssetTracker::SaveAssetPostSourceControl : TempToTargetFileReplacement");
AZ::IO::FileIOBase* fileIO = AZ::IO::FileIOBase::GetInstance();
const bool targetFileExists = fileIO->Exists(m_saveInfo.m_streamName.data());
bool removedTargetFile;
{
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::ScriptCanvas, "AssetTracker::SaveAssetPostSourceControl : TempToTargetFileReplacement : RemoveTarget");
AZ_PROFILE_SCOPE(ScriptCanvas, "AssetTracker::SaveAssetPostSourceControl : TempToTargetFileReplacement : RemoveTarget");
removedTargetFile = fileIO->Remove(m_saveInfo.m_streamName.data());
}
@@ -733,7 +733,7 @@ namespace ScriptCanvasEditor
}
else
{
AZ_PROFILE_SCOPE(AZ::Debug::ProfileCategory::ScriptCanvas, "AssetTracker::SaveAssetPostSourceControl : TempToTargetFileReplacement : RenameTempFile");
AZ_PROFILE_SCOPE(ScriptCanvas, "AssetTracker::SaveAssetPostSourceControl : TempToTargetFileReplacement : RenameTempFile");
AZ::IO::Result renameResult = fileIO->Rename(tempPath.data(), m_saveInfo.m_streamName.data());
if (!renameResult)
{
@@ -103,7 +103,7 @@ namespace ScriptCanvasEditor
void UndoHelper::Undo()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::ScriptCanvas);
AZ_PROFILE_FUNCTION(ScriptCanvas);
SceneUndoState* sceneUndoState = m_memoryAsset.GetUndoState();
if (sceneUndoState)
@@ -123,7 +123,7 @@ namespace ScriptCanvasEditor
void UndoHelper::Redo()
{
AZ_PROFILE_FUNCTION(AZ::Debug::ProfileCategory::ScriptCanvas);
AZ_PROFILE_FUNCTION(ScriptCanvas);
SceneUndoState* sceneUndoState = m_memoryAsset.GetUndoState();
if (sceneUndoState)
@@ -99,7 +99,7 @@ namespace ScriptCanvasEditor::Nodes
AZStd::pair<ScriptCanvas::Node*, NodeIdPair> CreateAndGetNode(const AZ::Uuid& classId, const ScriptCanvas::ScriptCanvasId& scriptCanvasId, const StyleConfiguration& styleConfiguration, AZStd::function<void(ScriptCanvas::Node*)> onCreateCallback)
{
AZ_PROFILE_TIMER("ScriptCanvas", __FUNCTION__);
AZ_PROFILE_SCOPE("ScriptCanvas", __FUNCTION__);
NodeIdPair nodeIdPair;
ScriptCanvas::Node* node{};
@@ -134,7 +134,7 @@ namespace ScriptCanvasEditor::Nodes
NodeIdPair CreateObjectMethodNode(AZStd::string_view className, AZStd::string_view methodName, const ScriptCanvas::ScriptCanvasId& scriptCanvasId, ScriptCanvas::PropertyStatus propertyStatus)
{
AZ_PROFILE_TIMER("ScriptCanvas", __FUNCTION__);
AZ_PROFILE_SCOPE("ScriptCanvas", __FUNCTION__);
NodeIdPair nodeIds;
ScriptCanvas::Node* node = nullptr;
@@ -161,7 +161,7 @@ namespace ScriptCanvasEditor::Nodes
NodeIdPair CreateObjectMethodOverloadNode(AZStd::string_view className, AZStd::string_view methodName, const ScriptCanvas::ScriptCanvasId& scriptCanvasGraphId)
{
AZ_PROFILE_TIMER("ScriptCanvas", __FUNCTION__);
AZ_PROFILE_SCOPE("ScriptCanvas", __FUNCTION__);
NodeIdPair nodeIds;
ScriptCanvas::Node* node = nullptr;
@@ -188,7 +188,7 @@ namespace ScriptCanvasEditor::Nodes
NodeIdPair CreateGlobalMethodNode(AZStd::string_view methodName, const ScriptCanvas::ScriptCanvasId& scriptCanvasId)
{
AZ_PROFILE_TIMER("ScriptCanvas", __FUNCTION__);
AZ_PROFILE_SCOPE("ScriptCanvas", __FUNCTION__);
NodeIdPair nodeIds;
ScriptCanvas::Node* node = nullptr;
@@ -215,7 +215,7 @@ namespace ScriptCanvasEditor::Nodes
NodeIdPair CreateEbusWrapperNode(AZStd::string_view busName, const ScriptCanvas::ScriptCanvasId& scriptCanvasId)
{
AZ_PROFILE_TIMER("ScriptCanvas", __FUNCTION__);
AZ_PROFILE_SCOPE("ScriptCanvas", __FUNCTION__);
NodeIdPair nodeIdPair;
ScriptCanvas::Node* node = nullptr;
@@ -241,7 +241,7 @@ namespace ScriptCanvasEditor::Nodes
{
AZ_Assert(assetId.IsValid(), "CreateScriptEventReceiverNode asset Id must be valid");
AZ_PROFILE_TIMER("ScriptCanvas", __FUNCTION__);
AZ_PROFILE_SCOPE("ScriptCanvas", __FUNCTION__);
NodeIdPair nodeIdPair;
AZ::Data::Asset<ScriptEvents::ScriptEventsAsset> asset = AZ::Data::AssetManager::Instance().GetAsset<ScriptEvents::ScriptEventsAsset>(assetId, AZ::Data::AssetLoadBehavior::Default);
@@ -276,7 +276,7 @@ namespace ScriptCanvasEditor::Nodes
{
AZ_Assert(assetId.IsValid(), "CreateScriptEventSenderNode asset Id must be valid");
AZ_PROFILE_TIMER("ScriptCanvas", __FUNCTION__);
AZ_PROFILE_SCOPE("ScriptCanvas", __FUNCTION__);
NodeIdPair nodeIdPair;
AZ::Data::Asset<ScriptEvents::ScriptEventsAsset> asset = AZ::Data::AssetManager::Instance().GetAsset<ScriptEvents::ScriptEventsAsset>(assetId, AZ::Data::AssetLoadBehavior::Default);
@@ -302,7 +302,7 @@ namespace ScriptCanvasEditor::Nodes
NodeIdPair CreateGetVariableNode(const ScriptCanvas::VariableId& variableId, ScriptCanvas::ScriptCanvasId scriptCanvasId)
{
AZ_PROFILE_TIMER("ScriptCanvas", __FUNCTION__);
AZ_PROFILE_SCOPE("ScriptCanvas", __FUNCTION__);
const AZ::Uuid k_VariableNodeTypeId = azrtti_typeid<ScriptCanvas::Nodes::Core::GetVariableNode>();
NodeIdPair nodeIds;
@@ -333,7 +333,7 @@ namespace ScriptCanvasEditor::Nodes
NodeIdPair CreateSetVariableNode(const ScriptCanvas::VariableId& variableId, ScriptCanvas::ScriptCanvasId scriptCanvasId)
{
AZ_PROFILE_TIMER("ScriptCanvas", __FUNCTION__);
AZ_PROFILE_SCOPE("ScriptCanvas", __FUNCTION__);
const AZ::Uuid k_VariableNodeTypeId = azrtti_typeid<ScriptCanvas::Nodes::Core::SetVariableNode>();
NodeIdPair nodeIds;
@@ -366,7 +366,7 @@ namespace ScriptCanvasEditor::Nodes
{
AZ_Assert(assetId.IsValid(), "CreateFunctionNode source asset Id must be valid");
AZ_PROFILE_TIMER("ScriptCanvas", __FUNCTION__);
AZ_PROFILE_SCOPE("ScriptCanvas", __FUNCTION__);
NodeIdPair nodeIdPair;
AZ::Data::Asset<ScriptCanvas::SubgraphInterfaceAsset> asset = AZ::Data::AssetManager::Instance().GetAsset<ScriptCanvas::SubgraphInterfaceAsset>(assetId, AZ::Data::AssetLoadBehavior::PreLoad);
@@ -394,7 +394,7 @@ namespace ScriptCanvasEditor::Nodes
NodeIdPair CreateAzEventHandlerNode(const AZ::BehaviorMethod& methodWithAzEventReturn, ScriptCanvas::ScriptCanvasId scriptCanvasId,
AZ::EntityId connectingMethodNodeId)
{
AZ_PROFILE_TIMER("ScriptCanvas", __FUNCTION__);
AZ_PROFILE_SCOPE("ScriptCanvas", __FUNCTION__);
NodeIdPair nodeIdPair;
// Make sure the method returns an AZ::Event by reference or pointer
@@ -57,7 +57,7 @@ namespace ScriptCanvasEditor::Nodes
// Handles the creation of a node through the node configurations for most nodes.
AZ::EntityId DisplayGeneralScriptCanvasNode(AZ::EntityId, const ScriptCanvas::Node* node, const NodeConfiguration& nodeConfiguration)
{
AZ_PROFILE_TIMER("ScriptCanvas", __FUNCTION__);
AZ_PROFILE_SCOPE("ScriptCanvas", __FUNCTION__);
AZ::Entity* graphCanvasEntity = nullptr;
@@ -445,7 +445,7 @@ namespace ScriptCanvasEditor::Nodes
AZ::EntityId DisplayEbusEventNode(AZ::EntityId, const AZStd::string& busName, const AZStd::string& eventName, const ScriptCanvas::EBusEventId& eventId)
{
AZ_PROFILE_TIMER("ScriptCanvas", __FUNCTION__);
AZ_PROFILE_SCOPE("ScriptCanvas", __FUNCTION__);
AZ::EntityId graphCanvasNodeId;
@@ -668,7 +668,7 @@ namespace ScriptCanvasEditor::Nodes
AZ::EntityId DisplayScriptEventNode(AZ::EntityId, const AZ::Data::AssetId assetId, const ScriptEvents::Method& methodDefinition)
{
AZ_PROFILE_TIMER("ScriptCanvas", __FUNCTION__);
AZ_PROFILE_SCOPE("ScriptCanvas", __FUNCTION__);
AZ::EntityId graphCanvasNodeId;
@@ -1001,7 +1001,7 @@ namespace ScriptCanvasEditor::Nodes
AZ::EntityId DisplayGetVariableNode(AZ::EntityId graphCanvasGraphId, const ScriptCanvas::Nodes::Core::GetVariableNode* variableNode)
{
AZ_PROFILE_TIMER("ScriptCanvas", __FUNCTION__);
AZ_PROFILE_SCOPE("ScriptCanvas", __FUNCTION__);
NodeConfiguration nodeConfiguration;
nodeConfiguration.PopulateComponentDescriptors<IconComponent, DynamicSlotComponent, GetVariableNodeDescriptorComponent>();
@@ -1033,7 +1033,7 @@ namespace ScriptCanvasEditor::Nodes
AZ::EntityId DisplaySetVariableNode(AZ::EntityId graphCanvasGraphId, const ScriptCanvas::Nodes::Core::SetVariableNode* variableNode)
{
AZ_PROFILE_TIMER("ScriptCanvas", __FUNCTION__);
AZ_PROFILE_SCOPE("ScriptCanvas", __FUNCTION__);
NodeConfiguration nodeConfiguration;
nodeConfiguration.PopulateComponentDescriptors<IconComponent, DynamicSlotComponent, SetVariableNodeDescriptorComponent>();
@@ -1069,7 +1069,7 @@ namespace ScriptCanvasEditor::Nodes
///////////////////
AZ::EntityId DisplayScriptCanvasNode(AZ::EntityId graphCanvasGraphId, const ScriptCanvas::Node* node)
{
AZ_PROFILE_TIMER("ScriptCanvas", __FUNCTION__);
AZ_PROFILE_SCOPE("ScriptCanvas", __FUNCTION__);
AZ::EntityId graphCanvasNodeId;
if (azrtti_istypeof<ScriptCanvas::Nodes::Core::SetVariableNode>(node))
@@ -1122,7 +1122,7 @@ namespace ScriptCanvasEditor::Nodes
static void RegisterAndActivateGraphCanvasSlot(AZ::EntityId graphCanvasNodeId, const ScriptCanvas::SlotId& slotId, AZ::Entity* slotEntity)
{
AZ_PROFILE_TIMER("ScriptCanvas", __FUNCTION__);
AZ_PROFILE_SCOPE("ScriptCanvas", __FUNCTION__);
if (slotEntity)
{
slotEntity->Init();
@@ -1166,7 +1166,7 @@ namespace ScriptCanvasEditor::Nodes
return AZ::EntityId();
}
AZ_PROFILE_TIMER("ScriptCanvas", __FUNCTION__);
AZ_PROFILE_SCOPE("ScriptCanvas", __FUNCTION__);
AZ::Entity* slotEntity = nullptr;
AZ::Uuid typeId = ScriptCanvas::Data::ToAZType(slot.GetDataType());
@@ -1258,7 +1258,7 @@ namespace ScriptCanvasEditor::Nodes::SlotDisplayHelper
{
AZ::EntityId DisplayPropertySlot(AZ::EntityId graphCanvasNodeId, const ScriptCanvas::VisualExtensionSlotConfiguration& propertyConfiguration)
{
AZ_PROFILE_TIMER("ScriptCanvas", __FUNCTION__);
AZ_PROFILE_SCOPE("ScriptCanvas", __FUNCTION__);
GraphCanvas::SlotConfiguration graphCanvasConfiguration;
@@ -1284,7 +1284,7 @@ namespace ScriptCanvasEditor::Nodes::SlotDisplayHelper
AZ::EntityId DisplayExtendableSlot(AZ::EntityId graphCanvasNodeId, const ScriptCanvas::VisualExtensionSlotConfiguration& extenderConfiguration)
{
AZ_PROFILE_TIMER("ScriptCanvas", __FUNCTION__);
AZ_PROFILE_SCOPE("ScriptCanvas", __FUNCTION__);
GraphCanvas::ExtenderSlotConfiguration graphCanvasConfiguration;