[PATCH i-g-t 04/21] trace.pl: Virtual engine preemption support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>

Use the 'completed?' tracepoint field to detect more robustly when a
request has been preempted and remove it from the engine database if so.

Otherwise the script can hit a scenario where the same global seqno will
be mentioned multiple times (on an engine seqno) which aborts processing.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
---
 scripts/trace.pl | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/trace.pl b/scripts/trace.pl
index 6cc332bb6e2a..cb7cc46df22e 100755
--- a/scripts/trace.pl
+++ b/scripts/trace.pl
@@ -483,17 +483,17 @@ while (<>) {
 		$ringmap{$rings{$ring}} = $ring;
 		$db{$key} = \%req;
 	} elsif ($tp_name eq 'i915:i915_request_out:') {
-		my $gkey;
-
 		die unless exists $ctxengines{$ctx};
 
-		$gkey = db_key($ctxengines{$ctx}, $ctx, $seqno);
-
 		if ($tp{'completed?'}) {
+			my $gkey;
+
 			die unless exists $db{$key};
 			die unless exists $db{$key}->{'start'};
 			die if exists $db{$key}->{'end'};
 
+			$gkey = db_key($ctxengines{$ctx}, $ctx, $seqno);
+
 			$db{$key}->{'end'} = $time;
 			$db{$key}->{'notify'} = $notify{$gkey}
 						if exists $notify{$gkey};
-- 
2.19.1

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




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux