From patchwork Thu Jul 19 09:35:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 10533997 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 DE1F0600F4 for ; Thu, 19 Jul 2018 09:36:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CE3C729667 for ; Thu, 19 Jul 2018 09:36:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C278B29676; Thu, 19 Jul 2018 09:36:15 +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 7BF6529667 for ; Thu, 19 Jul 2018 09:36:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8372D6ED6D; Thu, 19 Jul 2018 09:36:13 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by gabe.freedesktop.org (Postfix) with ESMTPS id 90C996ED66 for ; Thu, 19 Jul 2018 09:36:09 +0000 (UTC) Received: by mail-wr1-x435.google.com with SMTP id j5-v6so7354419wrr.8 for ; Thu, 19 Jul 2018 02:36:09 -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=znsIfjE6Xm5ukD+2AJnaAl8mycsavxTW3RUuDnKVuwM=; b=CXc0xWa8gKbvYSh+XpsoIA/O4v2XxIyeC0iNlwyOBa+NK8pgOOYizE5Lg6pLWWRrRK BUZ4OnZM8b/Ftmg9sDDwKhI/dVsmDkZZqN2dZd1esOihPmzu8BnMfQL38e6Db161xQIU yjKU6i1qIZiC+WFQaF18JjWJ3fm819T5l2cgMMxdPFFZMpNslkv4Zvtfe9ImiIz8VO1w RBNVYgyDdOhjePNSsacLK/x+nHBp96JwjZuFh4MogO5DfBp29Za1CEAaH5auDLUBUoD1 hLTTezJtAHVvgEZ6MzA/qd/BQyVZkhkbK7YNC7pALTpIpv0Vq5vY+Gdjs34W51W0DxmS Yrkw== X-Gm-Message-State: AOUpUlGlsjhRyO9YRkPJjMXOHN5ZU/XAi9lIUn6Bl3aF4pRd605IEXLK /PdLmFt1oARj1yolHCpUwA9eVg== X-Google-Smtp-Source: AAOMgpdJG/OiOjXWYwLPbFJnwBvbEvRvvIUukeTlH3sL6+RO6FeRyXYjXCJv3IGfzJ8LK8mWukjWkg== X-Received: by 2002:adf:ac2d:: with SMTP id v42-v6mr6964689wrc.142.1531992968269; Thu, 19 Jul 2018 02:36:08 -0700 (PDT) Received: from localhost.localdomain ([95.146.151.144]) by smtp.gmail.com with ESMTPSA id a11-v6sm8422004wrr.81.2018.07.19.02.36.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Jul 2018 02:36:07 -0700 (PDT) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: igt-dev@lists.freedesktop.org Date: Thu, 19 Jul 2018 10:35:58 +0100 Message-Id: <20180719093601.11788-2-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180719093601.11788-1-tvrtko.ursulin@linux.intel.com> References: <20180719093601.11788-1-tvrtko.ursulin@linux.intel.com> Subject: [Intel-gfx] [PATCH i-g-t 1/4] trace.pl: Context save only applies to last request of a bunch 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 Skip accounting the context save time for anything but the last request of the coalesced bunch, and also skip drawing those boxes on the timeline. Signed-off-by: Tvrtko Ursulin Reviewed-by: John Harrison Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> --- scripts/trace.pl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/trace.pl b/scripts/trace.pl index 5ae53fc0b68b..41bedeefb776 100755 --- a/scripts/trace.pl +++ b/scripts/trace.pl @@ -628,7 +628,11 @@ foreach my $key (@sorted_keys) { $min_ctx = $db{$key}->{'ctx'} if not defined $min_ctx or $db{$key}->{'ctx'} < $min_ctx; - $db{$key}->{'context-complete-delay'} = $end - $notify; + unless (exists $db{$key}->{'no-end'}) { + $db{$key}->{'context-complete-delay'} = $end - $notify; + } else { + $db{$key}->{'context-complete-delay'} = 0; + } $db{$key}->{'execute-delay'} = $start - $db{$key}->{'submit'}; $db{$key}->{'submit-delay'} = $db{$key}->{'submit'} - $db{$key}->{'queue'}; unless (exists $db{$key}->{'no-notify'}) { @@ -649,7 +653,7 @@ foreach my $key (@sorted_keys) { $submit_avg{$ring} += $db{$key}->{'submit-delay'}; $execute_avg{$ring} += $db{$key}->{'execute-delay'}; - $ctxsave_avg{$ring} += $end - $notify; + $ctxsave_avg{$ring} += $db{$key}->{'context-complete-delay'}; } foreach my $ring (sort keys %batch_avg) { @@ -1100,7 +1104,7 @@ foreach my $key (sort sortQueue keys %db) { } # user interrupt to context complete - unless (exists $skip_box{'ctxsave'}) { + unless (exists $skip_box{'ctxsave'} or exists $db{$key}->{'no-end'}) { $skey = -2 * $max_seqno * $ctx - 2 * $seqno; $style = box_style($ctx, 'ctxsave'); my $ctxsave = $db{$key}->{'end'} - $db{$key}->{'notify'};