igt-dev.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH i-g-t 0/8] trace.pl fixes and improvements
@ 2018-07-18  9:45 Tvrtko Ursulin
  2018-07-18  9:45 ` [igt-dev] [PATCH i-g-t 1/8] trace.pl: Improve time axis labels Tvrtko Ursulin
                   ` (9 more replies)
  0 siblings, 10 replies; 17+ messages in thread
From: Tvrtko Ursulin @ 2018-07-18  9:45 UTC (permalink / raw)
  To: igt-dev; +Cc: intel-gfx

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Dropped the scaling patch since it is possible to build timeline objects
directly with micro-seconds (conversion to dates is not needed)! This also makes
the time axis look correct in Firefox.

Only three and a half unreviewed patches remain. :)

John Harrison (1):
  trace.pl: Improved key/colours

Tvrtko Ursulin (7):
  trace.pl: Improve time axis labels
  trace.pl: Improve readability of graphical timeline representation
  trace.pl: Improve context colouring for large context id's
  trace.pl: Context save only applies to last request of a bunch
  trace.pl: Fix incomplete request handling
  trace.pl: Basic preemption support
  trace.pl: Fix request split mode

 scripts/media-bench.pl |   2 +-
 scripts/trace.pl       | 552 ++++++++++++++++++++++++++++++-----------
 2 files changed, 413 insertions(+), 141 deletions(-)

-- 
2.17.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread
* [igt-dev] [PATCH i-g-t 1/8] trace.pl: Fix no context colouring mode
@ 2018-06-05 17:50 Tvrtko Ursulin
  2018-06-05 17:50 ` [igt-dev] [PATCH i-g-t 7/8] trace.pl: Basic preemption support Tvrtko Ursulin
  0 siblings, 1 reply; 17+ messages in thread
From: Tvrtko Ursulin @ 2018-06-05 17:50 UTC (permalink / raw)
  To: igt-dev; +Cc: intel-gfx, Tvrtko Ursulin

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Commit 87d2affc380da96ba66c258c5337c363fe8651ef ("trace.pl: Add support
for colouring context execution"), due some dodgy attempts at patch
splitting broke the legacy colouring mode.

Fix it by passing in the request stage into the helper so all stages can
be correctly coloured in both modes.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: John Harrison <John.C.Harrison@Intel.com>
---
 scripts/trace.pl | 30 +++++++++++++++++++++++++-----
 1 file changed, 25 insertions(+), 5 deletions(-)

diff --git a/scripts/trace.pl b/scripts/trace.pl
index ea6c667696f4..fd414f5a4b1e 100755
--- a/scripts/trace.pl
+++ b/scripts/trace.pl
@@ -873,10 +873,30 @@ sub sortQueue {
 
 sub ctx_colour
 {
-	my ($ctx, $s, $l) = (@_);
+	my ($ctx, $stage) = (@_);
+	my ($s, $l);
 	my $val;
 
-	return 'Pink;' unless $colour_contexts;
+	unless ($colour_contexts) {
+		if ($stage eq 'queue') {
+			return 'lightblue;';
+		} elsif ($stage eq 'ready') {
+			return 'lightgrey;';
+		} elsif ($stage eq 'execute') {
+			return 'pink;';
+		}
+	} else {
+		if ($stage eq 'queue') {
+			$s = 35;
+			$l = 85;
+		} elsif ($stage eq 'ready') {
+			$s = 35;
+			$l = 45;
+		} elsif ($stage eq 'execute') {
+			$s = 80;
+			$l = 65;
+		}
+	}
 
 	$val = int(360 / ($max_ctx - $min_ctx + 1)) * ($ctx - $min_ctx);
 
@@ -898,7 +918,7 @@ foreach my $key (sort sortQueue keys %db) {
 	unless (exists $skip_box{'queue'}) {
 		$skey = 2 * $max_seqno * $ctx + 2 * $seqno;
 		$style = 'color: black; background-color: ' .
-			 ctx_colour($ctx, 35, 85);
+			 ctx_colour($ctx, 'queue');
 		$content = "$name<br>$db{$key}->{'submit-delay'}us <small>($db{$key}->{'execute-delay'}us)</small>";
 		$startend = 'start: \'' . ts($queue) . '\', end: \'' . ts($submit) . '\'';
 		print "\t{id: $i, key: $skey, $type group: $group, subgroup: 1, subgroupOrder: 1, content: '$content', $startend, style: \'$style\'},\n";
@@ -909,7 +929,7 @@ foreach my $key (sort sortQueue keys %db) {
 	unless (exists $skip_box{'ready'}) {
 		$skey = 2 * $max_seqno * $ctx + 2 * $seqno + 1;
 		$style = 'color: black; background-color: ' .
-			 ctx_colour($ctx, 35, 45);
+			 ctx_colour($ctx, 'ready');
 		$content = "<small>$name<br>$db{$key}->{'execute-delay'}us</small>";
 		$startend = 'start: \'' . ts($submit) . '\', end: \'' . ts($start) . '\'';
 		print "\t{id: $i, key: $skey, $type group: $group, subgroup: 1, subgroupOrder: 2, content: '$content', $startend, style: \'$style\'},\n";
@@ -923,7 +943,7 @@ foreach my $key (sort sortQueue keys %db) {
 			$style = 'color: white; background-color: red;';
 		} else {
 			$style = 'color: black; background-color: ' .
-				  ctx_colour($ctx, 80, 65);
+				  ctx_colour($ctx, 'execute');
 		}
 		$content = "$name <small>$db{$key}->{'port'}</small>";
 		$content .= ' <small><i>???</i></small> ' if exists $db{$key}->{'incomplete'};
-- 
2.17.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2018-07-27 22:22 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-18  9:45 [Intel-gfx] [PATCH i-g-t 0/8] trace.pl fixes and improvements Tvrtko Ursulin
2018-07-18  9:45 ` [igt-dev] [PATCH i-g-t 1/8] trace.pl: Improve time axis labels Tvrtko Ursulin
2018-07-18 20:03   ` John Harrison
2018-07-19  9:39     ` Tvrtko Ursulin
2018-07-27 22:22       ` John Harrison
2018-07-18  9:45 ` [Intel-gfx] [PATCH i-g-t 2/8] trace.pl: Improve readability of graphical timeline representation Tvrtko Ursulin
2018-07-18  9:45 ` [igt-dev] [PATCH i-g-t 3/8] trace.pl: Improve context colouring for large context id's Tvrtko Ursulin
2018-07-18  9:45 ` [Intel-gfx] [PATCH i-g-t 4/8] trace.pl: Improved key/colours Tvrtko Ursulin
2018-07-18  9:45 ` [igt-dev] [PATCH i-g-t 5/8] trace.pl: Context save only applies to last request of a bunch Tvrtko Ursulin
2018-07-18 20:11   ` John Harrison
2018-07-18  9:45 ` [igt-dev] [PATCH i-g-t 6/8] trace.pl: Fix incomplete request handling Tvrtko Ursulin
2018-07-18  9:45 ` [Intel-gfx] [PATCH i-g-t 7/8] trace.pl: Basic preemption support Tvrtko Ursulin
2018-07-18 20:13   ` [igt-dev] " John Harrison
2018-07-18  9:45 ` [igt-dev] [PATCH i-g-t 8/8] trace.pl: Fix request split mode Tvrtko Ursulin
2018-07-18 10:16 ` [igt-dev] ✓ Fi.CI.BAT: success for trace.pl fixes and improvements (rev12) Patchwork
2018-07-18 13:13 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2018-06-05 17:50 [igt-dev] [PATCH i-g-t 1/8] trace.pl: Fix no context colouring mode Tvrtko Ursulin
2018-06-05 17:50 ` [igt-dev] [PATCH i-g-t 7/8] trace.pl: Basic preemption support Tvrtko Ursulin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).