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

Few micro-second long boxes cannot be displayed by the visualizer in a
meaningful way so just burden the browser and the human looking at the
noise. Sp skip drawing anything shorter and 10us.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursu...@intel.com>
---
 scripts/trace.pl | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/scripts/trace.pl b/scripts/trace.pl
index 696c18e8b1cf..d92b338ba507 100755
--- a/scripts/trace.pl
+++ b/scripts/trace.pl
@@ -40,6 +40,7 @@ my $trace = 0;
 my $avg_delay_stats = 0;
 my $gpu_timeline = 0;
 my $colour_contexts = 0;
+my $min_duration = 10; # us
 
 my @args;
 
@@ -899,14 +900,15 @@ foreach my $key (sort sortQueue keys %db) {
        my ($name, $ctx, $seqno) = ($db{$key}->{'name'}, $db{$key}->{'ctx'}, 
$db{$key}->{'seqno'});
        my ($queue, $start, $notify, $end) = ($db{$key}->{'queue'}, 
$db{$key}->{'start'}, $db{$key}->{'notify'}, $db{$key}->{'end'});
        my $submit = $queue + $db{$key}->{'submit-delay'};
-       my ($content, $style);
+       my ($content, $style, $duration);
        my $group = $engine_start_id + $rings{$db{$key}->{'ring'}};
        my $type = ' type: \'range\',';
        my $startend;
        my $skey;
 
        # submit to execute
-       unless (exists $skip_box{'queue'}) {
+       $duration = $submit - $queue;
+       unless (exists $skip_box{'queue'} or $duration < $min_duration) {
                $skey = 2 * $max_seqno * $ctx + 2 * $seqno;
                $style = box_style($ctx, 90, 35, 85);
                $content = "$name<br>$db{$key}->{'submit-delay'}us 
<small>($db{$key}->{'execute-delay'}us)</small>";
@@ -916,7 +918,8 @@ foreach my $key (sort sortQueue keys %db) {
        }
 
        # execute to start
-       unless (exists $skip_box{'ready'}) {
+       $duration = $start - $submit;
+       unless (exists $skip_box{'ready'} or $duration < $min_duration) {
                $skey = 2 * $max_seqno * $ctx + 2 * $seqno + 1;
                $style = box_style($ctx, 45, 35, 45);
                $content = 
"<small>$name<br>$db{$key}->{'execute-delay'}us</small>";
@@ -926,7 +929,8 @@ foreach my $key (sort sortQueue keys %db) {
        }
 
        # start to user interrupt
-       unless (exists $skip_box{'execute'}) {
+       $duration = $notify - $start;
+       unless (exists $skip_box{'execute'} or $duration < $min_duration) {
                $skey = -2 * $max_seqno * $ctx - 2 * $seqno - 1;
                if (exists $db{$key}->{'incomplete'}) {
                        $style = 'color: white; background-color: red;';
@@ -944,7 +948,8 @@ foreach my $key (sort sortQueue keys %db) {
        }
 
        # user interrupt to context complete
-       unless (exists $skip_box{'ctxsave'}) {
+       $duration = $end - $notify;
+       unless (exists $skip_box{'ctxsave'} or $duration < $min_duration) {
                $skey = -2 * $max_seqno * $ctx - 2 * $seqno;
                $style = 'color: black; background-color: orange;';
                my $ctxsave = $db{$key}->{'end'} - $db{$key}->{'notify'};
-- 
2.14.1

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

Reply via email to