From ca18c192976d84f40d87843bbd69a9869d24ab38 Mon Sep 17 00:00:00 2001 From: amy Date: Sun, 8 Dec 2024 17:35:48 +0000 Subject: [PATCH] prettify output --- OpenDreamRuntime/DreamThread.cs | 3 ++- OpenDreamRuntime/Procs/DMProc.cs | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/OpenDreamRuntime/DreamThread.cs b/OpenDreamRuntime/DreamThread.cs index 66ba5f5454..a16020ba8e 100644 --- a/OpenDreamRuntime/DreamThread.cs +++ b/OpenDreamRuntime/DreamThread.cs @@ -255,8 +255,9 @@ public DreamValue ReentrantResume(ProcState? untilState, out ProcStatus resultSt try { if (Profiler.IsActivated() && _current.TracyZoneId is null && _current.Proc != null) { //IsActivated() call just for optimisation reasons var location =_current.TracyLocationId; + var procpath = (_current.Proc.OwningType.Path.Equals("/") ? "/proc/" : _current.Proc.OwningType.Path+"/") +_current.Proc.Name; // ReSharper disable ExplicitCallerInfoArgument - _current.TracyZoneId = Profiler.BeginZone((_current.Proc.OwningType.Path.Equals("/") ? "/proc/" : _current.Proc.OwningType.Path+"/") +_current.Proc.Name, filePath: location.SourceFile, lineNumber: location.Line); + _current.TracyZoneId = Profiler.BeginZone(filePath: location.SourceFile, lineNumber: location.Line, memberName: procpath); // ReSharper restore ExplicitCallerInfoArgument } // _current.Resume may mutate our state!!! diff --git a/OpenDreamRuntime/Procs/DMProc.cs b/OpenDreamRuntime/Procs/DMProc.cs index 8b8f093b56..51477eb49b 100644 --- a/OpenDreamRuntime/Procs/DMProc.cs +++ b/OpenDreamRuntime/Procs/DMProc.cs @@ -51,7 +51,7 @@ public DMProc(int id, TreeEntry owningType, ProcDefinitionJson json, string? nam public (string Source, int Line) GetSourceAtOffset(int offset) { if(SourceInfo.Count == 0) - return ("whatthefuck",0); + return ("",0); SourceInfoJson current = SourceInfo[0]; string source = ObjectTree.Strings[current.File!.Value]; @@ -153,7 +153,7 @@ public sealed class NullProcState : ProcState { public override DreamProc? Proc => _proc; - public override (string SourceFile, int Line) TracyLocationId => ("",0); + public override (string SourceFile, int Line) TracyLocationId => ("",0); private DreamProc? _proc;