diff options
author | Tvrtko Ursulin <tvrtko.ursulin@intel.com> | 2018-10-12 12:23:30 +0100 |
---|---|---|
committer | Tvrtko Ursulin <tvrtko.ursulin@intel.com> | 2019-05-22 09:51:43 +0100 |
commit | 67ecd5ed40cb0b179fe570e6ad5dc030d3d3c5fa (patch) | |
tree | bfeaf2337de811ef63cb012f86f9ab3ea1432ec1 /scripts | |
parent | 47167dca71548ae9ed0619f830c755844c8f4aaa (diff) |
trace.pl: Virtual engine preemption support
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@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/trace.pl | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/scripts/trace.pl b/scripts/trace.pl index 1f4953b0..77587f24 100755 --- a/scripts/trace.pl +++ b/scripts/trace.pl @@ -488,16 +488,21 @@ while (<>) { $ringmap{$rings{$ring}} = $ring; $db{$key} = \%req; } elsif ($tp_name eq 'i915:i915_request_out:') { - my $nkey; + if ($tp{'completed?'}) { + my $nkey; - die unless exists $db{$key}; - die unless exists $db{$key}->{'start'}; - die if exists $db{$key}->{'end'}; + die unless exists $db{$key}; + die unless exists $db{$key}->{'start'}; + die if exists $db{$key}->{'end'}; - $nkey = notify_key($ctx, $seqno); + $nkey = notify_key($ctx, $seqno); - $db{$key}->{'end'} = $time; - $db{$key}->{'notify'} = $notify{$nkey} if exists $notify{$nkey}; + $db{$key}->{'end'} = $time; + $db{$key}->{'notify'} = $notify{$nkey} + if exists $notify{$nkey}; + } else { + delete $db{$key}; + } } elsif ($tp_name eq 'dma_fence:dma_fence_signaled:') { my $nkey; |