From 1b9a36e41923c7f6b2ef01478692308b4575b777 Mon Sep 17 00:00:00 2001 From: Tom Spira Date: Thu, 8 Feb 2024 10:56:53 +0100 Subject: [PATCH] Profiler: fix call tree --- other/profiler/ProfileGen.hx | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/other/profiler/ProfileGen.hx b/other/profiler/ProfileGen.hx index db8600b4b..b6e8e0395 100644 --- a/other/profiler/ProfileGen.hx +++ b/other/profiler/ProfileGen.hx @@ -294,21 +294,16 @@ class ProfileGen { for( f in thread.frames ) { if( f.samples.length == 0 ) continue; + var ts = timeStamp(f.startTime); + var tend = timeStamp(f.samples[f.samples.length-1].time); json.push({ pid : 0, tid : tid, - ts : timeStamp(f.startTime), - ph : "B", - cat : "devtools.timeline", - name : "FunctionCall", - }); - json.push({ - pid : 0, - tid : tid, - ts : timeStamp(f.samples[f.samples.length-1].time), - ph : "E", - cat : "devtools.timeline", - name : "FunctionCall" + ts : ts, + dur : tend - ts, + ph : "X", + cat : "disabled-by-default-devtools.timeline", + name : "RunTask", }); } for( f in thread.frames ) {