Refactor Tracy source locations to be static

#597
This commit is contained in:
Wojtek Figat
2021-08-13 13:44:29 +02:00
parent 7fc144b07b
commit bc634e9d37
10 changed files with 115 additions and 20 deletions

View File

@@ -1028,7 +1028,7 @@ namespace Flax.Build.Bindings
contents.AppendLine(" auto scriptVTable = (MMethod**)managedTypePtr->Script.ScriptVTable;");
contents.AppendLine($" ASSERT(scriptVTable && scriptVTable[{scriptVTableIndex}]);");
contents.AppendLine($" auto method = scriptVTable[{scriptVTableIndex}];");
contents.AppendLine(" PROFILE_CPU_NAMED(*method->ProfilerName);");
contents.AppendLine($" PROFILE_CPU_NAMED(\"{classInfo.FullNameManaged}::{functionInfo.Name}\");");
contents.AppendLine(" MonoObject* exception = nullptr;");
contents.AppendLine(" auto prevWrapperCallInstance = WrapperCallInstance;");
@@ -1290,7 +1290,7 @@ namespace Flax.Build.Bindings
contents.Append(" if (!mmethod)").AppendLine();
contents.AppendFormat(" mmethod = {1}::TypeInitializer.GetType().ManagedClass->GetMethod(\"Internal_{0}_Invoke\", {2});", eventInfo.Name, classTypeNameNative, paramsCount).AppendLine();
contents.Append(" CHECK(mmethod);").AppendLine();
contents.Append(" PROFILE_CPU_NAMED(*mmethod->ProfilerName);").AppendLine();
contents.Append($" PROFILE_CPU_NAMED(\"{classInfo.FullNameManaged}::On{eventInfo.Name}\");").AppendLine();
contents.Append(" MonoObject* exception = nullptr;").AppendLine();
if (paramsCount == 0)
contents.AppendLine(" void** params = nullptr;");