From patchwork Tue Jun 5 17:50:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 10448919 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 50D5260375 for ; Tue, 5 Jun 2018 17:51:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3F5AD29ACD for ; Tue, 5 Jun 2018 17:51:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 346D829B27; Tue, 5 Jun 2018 17:51:08 +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 E2BEC29ACD for ; Tue, 5 Jun 2018 17:51:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8C0046EEF0; Tue, 5 Jun 2018 17:51:06 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wr0-x243.google.com (mail-wr0-x243.google.com [IPv6:2a00:1450:400c:c0c::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 56E8389CCE for ; Tue, 5 Jun 2018 17:51:03 +0000 (UTC) Received: by mail-wr0-x243.google.com with SMTP id a12-v6so3368215wro.1 for ; Tue, 05 Jun 2018 10:51:03 -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=6r+5NKqaMEPzswz5JmMiJ0YYiuKbwIlYc1yPfI1UEnc=; b=RuxDW+Izt4hAdjbwTy9bcNSPdy6w5gRP6o/+ydwwPJuar8Z5As9UhezwsKsXGS89I/ E3Zs/1G1mXOPbOLX9j/2GWmj8gCGPKt6NaRbCoxqoqm9KTdXYVSO3OrO29SX0tQn4jcn 40wEPG59TcRTqd6h9dfFSZnRKGbfTdWH8oNT0z1wC0CW83ZAIHgSsOF1vNBvdwLnDOa3 ho2wYFUMG+tyB5IkXhcQb1+swB0y1mWqvKdM/gTp3gpX0F7LwYSsFAKFZHIjQPXrQ+G+ dC5MtiboVsEotEsnhZwmY9joo4ke8re5jSf4GX8DBunbJ6qz9gMSIbLEeBV0cLSl7RUx +lGQ== X-Gm-Message-State: ALKqPwd1+k6BAEiGcQbOjpUQYXvkLLNJXIvzCx9FcU6dK/JxbYnIJkZ5 qfORp0/izTEov25CbduPCO52rQTv X-Google-Smtp-Source: ADUXVKLf03yL3C/j2x1RDcbBvpJLig7+qKv1/1JuTeaez64Er7OgrZGowwa3jKYynaPVPCIjAz8A7A== X-Received: by 2002:adf:9634:: with SMTP id b49-v6mr20245025wra.253.1528221061981; Tue, 05 Jun 2018 10:51:01 -0700 (PDT) Received: from localhost.localdomain ([95.146.151.144]) by smtp.gmail.com with ESMTPSA id u108-v6sm59739052wrc.40.2018.06.05.10.51.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Jun 2018 10:51:00 -0700 (PDT) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: igt-dev@lists.freedesktop.org Date: Tue, 5 Jun 2018 18:50:47 +0100 Message-Id: <20180605175050.29850-5-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 5/8] 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 --- scripts/trace.pl | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/trace.pl b/scripts/trace.pl index 96ff80ab46a9..c2f1df5afa9e 100755 --- a/scripts/trace.pl +++ b/scripts/trace.pl @@ -599,7 +599,11 @@ foreach my $key (@sorted_keys) { $max_ctx = $db{$key}->{'ctx'} if not defined $max_ctx or $db{$key}->{'ctx'} > $max_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'}; $db{$key}->{'duration'} = $notify - $start; @@ -616,7 +620,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) { @@ -988,7 +992,8 @@ foreach my $key (sort sortQueue keys %db) { # user interrupt to context complete $duration = $end - $notify; - unless (exists $skip_box{'ctxsave'} or $duration < $min_duration) { + unless (exists $skip_box{'ctxsave'} or $duration < $min_duration or + exists $db{$key}->{'no-end'}) { $skey = -2 * $max_seqno * $ctx - 2 * $seqno; $style = 'color: black; background-color: orange;'; my $ctxsave = $db{$key}->{'end'} - $db{$key}->{'notify'};