From: John Harrison Subject: Re: [PATCH i-g-t 3/4] trace.pl: Bring back timeline stacking Date: Fri, 27 Jul 2018 14:47:56 -0700 Message-ID: <12d41c4f-86e0-583a-5cbb-1e4f95423a43@Intel.com> References: <20180719093601.11788-1-tvrtko.ursulin@linux.intel.com> <20180719093601.11788-4-tvrtko.ursulin@linux.intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0860191737==" Return-path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by gabe.freedesktop.org (Postfix) with ESMTPS id 29F496EAF3 for ; Fri, 27 Jul 2018 21:47:57 +0000 (UTC) In-Reply-To: <20180719093601.11788-4-tvrtko.ursulin@linux.intel.com> Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org This is a multi-part message in MIME format. --===============0860191737== Content-Type: multipart/alternative; boundary="------------3B1DB3B13933C012DFFB42A2" Content-Language: en-US This is a multi-part message in MIME format. --------------3B1DB3B13933C012DFFB42A2 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 7/19/2018 2:36 AM, Tvrtko Ursulin wrote: > From: Tvrtko Ursulin > > Bring back the button which expands/stacks overlapping timeline boxes. > > We default to no stacking, but sometimes expanding the view can be useful, > especially with deep request pipelines. > > Signed-off-by: Tvrtko Ursulin > --- > scripts/trace.pl | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/scripts/trace.pl b/scripts/trace.pl > index 59f6d32dc3c8..1924333e12b6 100755 > --- a/scripts/trace.pl > +++ b/scripts/trace.pl > @@ -935,6 +935,7 @@ Boxes are in format 'ctx-id/seqno'. >

> Use Ctrl+scroll-action to zoom-in/out and scroll-action or dragging to move around the timeline. >

> + > > > > @@ -1284,6 +1285,12 @@ print < > // Create a Timeline > var timeline = new vis.Timeline(container, items, groups, options); > + > + function toggleStacking() { > + options.stack = !options.stack; > + options.stackSubgroups = !options.stackSubgroups; > + timeline.setOptions(options); > + } > ENDHTML > > print < --------------3B1DB3B13933C012DFFB42A2 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit On 7/19/2018 2:36 AM, Tvrtko Ursulin wrote:
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Bring back the button which expands/stacks overlapping timeline boxes.

We default to no stacking, but sometimes expanding the view can be useful,
especially with deep request pipelines.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 scripts/trace.pl | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/scripts/trace.pl b/scripts/trace.pl
index 59f6d32dc3c8..1924333e12b6 100755
--- a/scripts/trace.pl
+++ b/scripts/trace.pl
@@ -935,6 +935,7 @@ Boxes are in format 'ctx-id/seqno'.
 <p>
 Use Ctrl+scroll-action to zoom-in/out and scroll-action or dragging to move around the timeline.
 </p>
+<button onclick="toggleStacking()">Toggle overlap stacking</button>
 </td>
 </tr>
 </table>
@@ -1284,6 +1285,12 @@ print <<ENDHTML;
 
   // Create a Timeline
   var timeline = new vis.Timeline(container, items, groups, options);
+
+  function toggleStacking() {
+	options.stack = !options.stack;
+	options.stackSubgroups = !options.stackSubgroups;
+	timeline.setOptions(options);
+  }
 ENDHTML
 
 print <<ENDHTML;

Reviewed-by: John Harrison <John.C.Harrison@Intel.com>

--------------3B1DB3B13933C012DFFB42A2-- --===============0860191737== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KSW50ZWwtZ2Z4 IG1haWxpbmcgbGlzdApJbnRlbC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vaW50ZWwtZ2Z4Cg== --===============0860191737==--