Skip to content

Commit

Permalink
prettify output
Browse files Browse the repository at this point in the history
  • Loading branch information
amylizzle committed Dec 8, 2024
1 parent 82658f9 commit ca18c19
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion OpenDreamRuntime/DreamThread.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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!!!
Expand Down
4 changes: 2 additions & 2 deletions OpenDreamRuntime/Procs/DMProc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 ("<No Source Attached>",0);
SourceInfoJson current = SourceInfo[0];
string source = ObjectTree.Strings[current.File!.Value];

Expand Down Expand Up @@ -153,7 +153,7 @@ public sealed class NullProcState : ProcState {

public override DreamProc? Proc => _proc;

public override (string SourceFile, int Line) TracyLocationId => ("<null>",0);
public override (string SourceFile, int Line) TracyLocationId => ("<NO-OP>",0);

private DreamProc? _proc;

Expand Down

0 comments on commit ca18c19

Please sign in to comment.