From patchwork Thu May 10 10:19:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 10391609 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 9486C60153 for ; Thu, 10 May 2018 10:20:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 83BF32890F for ; Thu, 10 May 2018 10:20:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 78671289C5; Thu, 10 May 2018 10:20:32 +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=-2.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,T_DKIM_INVALID 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 2AD5C289BC for ; Thu, 10 May 2018 10:20:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 46BA06EEE6; Thu, 10 May 2018 10:20:00 +0000 (UTC) X-Original-To: Intel-gfx@lists.freedesktop.org Delivered-To: Intel-gfx@lists.freedesktop.org Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id B39D26EEEB for ; Thu, 10 May 2018 10:19:58 +0000 (UTC) Received: by mail-wm0-x244.google.com with SMTP id n10-v6so3420788wmc.1 for ; Thu, 10 May 2018 03:19:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ursulin-net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=AgjxaU52F/G5vxPH+dfLB+sn1+RAgeMpsEmQ2TFKIq4=; b=vv7hrJcxh4ejTHWPVkbzG2988Wn0J9VHf8SAkyU6Zz4cjxCbxZtnOtxhTsFBy5vm29 Iqm5IVVICx4BJ4ZqpT7Z316a+Y1+56tUOyUMFLwOxTUgQ4Tp4jg8jAVQElmp2z2Ng7iF Mnv7rBQzztKrQZfIBxX7fCarBTxr5Oc1KJBwKuMe6AYbVJtQ3B3we7jfu5/xmdQcrzOh ZKrnWAbPNDywkvRW1Xc2QVRTZrxx9tVQXRzASF6TpK5ZcyzZcc1F9qkK52WSB4CZtaNQ j7OYeJXSAMQF4lmlzauZoKX4JbmrvQhoKiTNNGZX7s44GKmJDGkJlgYkJIl53Gh2s4ER +yAg== 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=AgjxaU52F/G5vxPH+dfLB+sn1+RAgeMpsEmQ2TFKIq4=; b=fXR7je3DMWZQ1MgfqCPvCi7DTQ1MkrpNlnlEeBdGeh50KWF4jq17gx2/cuL9M3PcMI yJlgE4p30IJp/QeMfdDu+SqqQmFIdNZjX5m6WBhU6K3/+0dClEUH1WtMW30yb9hYUMoa uYDL+pFr85mjYF3rr0nIPb8sS5eGpYobqhTkYrAR0C+BUtsJIC9ADjQo4v0qqWFzo5vP jcjkSoItOnfm0sMSsGnxTxZpjKQVxklz5yR+v9SziP+5VegkWQ7CnT+US7mCJXQRCcw6 U3Q3PmbFcD17LlmatEw/LmgyeJOB6FCBbZIzLncjnptF1zydg4ewJ1Kfc1/a5+B1YpSm +wIQ== X-Gm-Message-State: ALKqPwc3DuPRiNTmOY6SW9MVN8V19b/cSsuLycPGvJbBQ1V0rQkYEHn9 j8BKh84Y/oPXV9oS1z8X9PRR3g== X-Google-Smtp-Source: AB8JxZrpwohGiVyXVfvQfmUYNYZhe46pEsJwLwodlnbfSZyGM0J/Z4j+fC7TieKYCYpTirW8io/yww== X-Received: by 2002:a1c:ac8a:: with SMTP id v132-v6mr790113wme.105.1525947597309; Thu, 10 May 2018 03:19:57 -0700 (PDT) Received: from localhost.localdomain ([95.146.151.144]) by smtp.gmail.com with ESMTPSA id o53-v6sm1178774wrc.96.2018.05.10.03.19.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 May 2018 03:19:56 -0700 (PDT) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: igt-dev@lists.freedesktop.org Date: Thu, 10 May 2018 11:19:20 +0100 Message-Id: <20180510101924.20814-5-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180510101924.20814-1-tvrtko.ursulin@linux.intel.com> References: <20180510101924.20814-1-tvrtko.ursulin@linux.intel.com> Subject: [Intel-gfx] [PATCH i-g-t 5/9] 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 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
$db{$key}->{'submit-delay'}us ($db{$key}->{'execute-delay'}us)"; @@ -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 = "$name
$db{$key}->{'execute-delay'}us
"; @@ -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'};