From patchwork Wed Jul 18 09:45:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 10531951 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 50A62602CA for ; Wed, 18 Jul 2018 09:45:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3D37628FBC for ; Wed, 18 Jul 2018 09:45:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 31D0828FCD; Wed, 18 Jul 2018 09:45:31 +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 E4CDE28FBC for ; Wed, 18 Jul 2018 09:45:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2DEDB6E98B; Wed, 18 Jul 2018 09:45:28 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id CDF216E988 for ; Wed, 18 Jul 2018 09:45:26 +0000 (UTC) Received: by mail-wm0-x243.google.com with SMTP id h20-v6so2148681wmb.4 for ; Wed, 18 Jul 2018 02:45:26 -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=DX3OSf6dKaQe26cqtnatg5qlPsL8MgALSd6HjI9iAIc=; b=Un8JZgXpTPjUVXMLj5NjgkQWa21GbBpjM46CNEgWQffS/T6lGTEc9hPid/IrXJMd4i kGtOD4IcIAj0g6WkvDr4pkLTv1tzRUQByOM5vHhhVpoLi1eIgZ0hmqN221+bkNK3oFHk zPfNMCdrrZRh962b7HVjZi4KgJjxONoibIQcwtsDap7YJFcmalu0DQVCSobtMAkaBnIh l/Ro7M+lARazNUFhTHENvCYjCTzX0kIuU6T8umz5i8wyzp+uuIYriTI3nCw4gaCTbOEQ V62xM4teNXbBHVMxUTenJHRjvqVO+srNUPExsXTFsBphEimbDPQ71x6U/ycq0wNKC499 kBDA== X-Gm-Message-State: AOUpUlHZaM3N/Yeuii1SoUtyrGWdd9A1vxbO6pjEVlqid6A82gBp6Dxp wvdvqevXjDoVZHstBwhOeHPNmg== X-Google-Smtp-Source: AAOMgpfHETiFB9W/iuqtU98BH1cgmFQPXQuHRhOw/CVU+4FXRrplDj6vsbeRqh2O2/QrL8DRuZ7nPw== X-Received: by 2002:a1c:149:: with SMTP id 70-v6mr1189545wmb.2.1531907125473; Wed, 18 Jul 2018 02:45:25 -0700 (PDT) Received: from localhost.localdomain ([95.146.151.144]) by smtp.gmail.com with ESMTPSA id q11-v6sm7919530wrp.58.2018.07.18.02.45.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Jul 2018 02:45:24 -0700 (PDT) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: igt-dev@lists.freedesktop.org Date: Wed, 18 Jul 2018 10:45:11 +0100 Message-Id: <20180718094514.5903-6-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180718094514.5903-1-tvrtko.ursulin@linux.intel.com> References: <20180718094514.5903-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 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/trace.pl b/scripts/trace.pl index 575fe83d8550..deb17e4a1816 100755 --- a/scripts/trace.pl +++ b/scripts/trace.pl @@ -577,7 +577,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'}; $db{$key}->{'duration'} = $notify - $start; @@ -594,7 +598,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) { @@ -1045,7 +1049,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'};