From patchwork Tue Jun 5 17:50:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 10448913 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 40B9D60375 for ; Tue, 5 Jun 2018 17:51:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2E72329B26 for ; Tue, 5 Jun 2018 17:51:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2389E29B29; Tue, 5 Jun 2018 17:51:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C73D829B26 for ; Tue, 5 Jun 2018 17:51:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8F1AC89DBC; Tue, 5 Jun 2018 17:51:03 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wr0-x244.google.com (mail-wr0-x244.google.com [IPv6:2a00:1450:400c:c0c::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id B8BF16EEE5 for ; Tue, 5 Jun 2018 17:51:01 +0000 (UTC) Received: by mail-wr0-x244.google.com with SMTP id f16-v6so3362854wrm.3 for ; Tue, 05 Jun 2018 10:51:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ZKBAvgZYOvRCkFsoUYiJrHSUt/96wyCx6D9HJ59doo0=; b=QpM/qnsVKljgnDrC02YlK1hjZnoQSD56TSIsQ6OVy4LleRHbTVLPB3F60r6pd8ffcI 1ZrLJekLbA2+Ttv1LgHzm5YTHdCgllXiAv090lnP0YU2gSExZk7DEcMDxdrOtsI9cqgU 3HUycNRoam3EhawRqtWVp42V7SpxwrR+3UpczET1+oKD3VZh1wB9Hx9J3gpcy4uwqtWe yARXtWK1fAB+zo/ZKdnM9/Br6GJ4nmEkWMk+jxxZZnwBi8g4L+pPEqmfYY1iiTk0zfY5 z7/BsdbuQjXAe4ItzDVT5okUxYVC6XJkvE53JbmPKqkDDmA8YT93cAp6e0uC+9s9TOLa b8wg== X-Gm-Message-State: ALKqPwd3Bz4Jui9fyRWe1YC20u7+NQv8pfmhyihSFMyyax9XMp2+v04M hrHPlCu6EjUo2eJY97iwQFeacE6l X-Google-Smtp-Source: ADUXVKJWlhypKVf5I6ind4aVNCSi5UWed8prF7zBncwBpYltk0pQHwEmnXNxTviEi7S8OMonHCWgLg== X-Received: by 2002:adf:bb10:: with SMTP id r16-v6mr19581449wrg.244.1528221060427; Tue, 05 Jun 2018 10:51:00 -0700 (PDT) Received: from localhost.localdomain ([95.146.151.144]) by smtp.gmail.com with ESMTPSA id u108-v6sm59739052wrc.40.2018.06.05.10.50.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Jun 2018 10:50:59 -0700 (PDT) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: igt-dev@lists.freedesktop.org Date: Tue, 5 Jun 2018 18:50:46 +0100 Message-Id: <20180605175050.29850-4-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180605175050.29850-1-tvrtko.ursulin@linux.intel.com> References: <20180605175050.29850-1-tvrtko.ursulin@linux.intel.com> Subject: [Intel-gfx] [PATCH i-g-t 4/8] trace.pl: Skip drawing very short boxes X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: intel-gfx@lists.freedesktop.org MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Tvrtko Ursulin 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 --- scripts/trace.pl | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/scripts/trace.pl b/scripts/trace.pl index 8f118d8665cf..96ff80ab46a9 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; @@ -938,14 +939,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, 'queue'); $content = "$name
$db{$key}->{'submit-delay'}us ($db{$key}->{'execute-delay'}us)"; @@ -955,7 +957,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, 'ready'); $content = "$name
$db{$key}->{'execute-delay'}us
"; @@ -965,7 +968,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;'; @@ -983,7 +987,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'};