From patchwork Thu May 10 10:19:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 10391605 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 98FD36053D for ; Thu, 10 May 2018 10:20:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8A2572890F for ; Thu, 10 May 2018 10:20:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7E3F7289CA; Thu, 10 May 2018 10:20:28 +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.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,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 2F74A2890F for ; Thu, 10 May 2018 10:20:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 230956EEF6; Thu, 10 May 2018 10:20:03 +0000 (UTC) X-Original-To: Intel-gfx@lists.freedesktop.org Delivered-To: Intel-gfx@lists.freedesktop.org Received: from mail-wr0-x242.google.com (mail-wr0-x242.google.com [IPv6:2a00:1450:400c:c0c::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5192A6EEEA for ; Thu, 10 May 2018 10:19:59 +0000 (UTC) Received: by mail-wr0-x242.google.com with SMTP id p4-v6so1458977wrh.3 for ; Thu, 10 May 2018 03:19:59 -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=Wzc6pmfaGkKC3RvoxO05hyvPXj+NvylyiMbWJ9AX+Aw=; b=HaQ4sljc1/VlmvejQYtT9pDaYzp0QmibC7VYA5Eb+Lr/9kyxQahy6fXCAwMsvlNzI5 GQC/j1+ciQ+iBCONaCn3kGufux13EWJZBVGkyUwpsnKbKCJ/DjeONwSgQHMdiZrx/Yj0 iWgydq6rgMVi8FThHlzP7uk6u7HG3gQO4HGxmL4LAel1+Ta8IvIbDIOqE9W3SaLEHmY2 lDsVbEh8MoAabn76sqrEZHxRDsOC6ufQ/Fl+XjnDIwjXsd21fMhEiW0u6MvUappd1Kxy QmFRqeKj5gFtDb3hccK2kck0biJySp+K7AdlUosLObgNP4XXd91Yo1AnwJTJPNk8DLSs mtLA== 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=Wzc6pmfaGkKC3RvoxO05hyvPXj+NvylyiMbWJ9AX+Aw=; b=huMHwq8vF07YxPYxtRdJPZJ9WtOHFuYMYnvt3b7UkXU087RebpdwQQqi8gSDeSGYk7 j91ZYGV+kPla/c5363CCjzFfaY4wd15ik7qJ+Kv1lySKduisDPgr4ZIahDH1JYoZCPXZ dTmDaL1O2Qmq+77ROTAMZBRXoLHio1w21lnSR63fsjRFTb0iB74wT4aIzudYQZ8EGRq5 2rHmZa236uy5uBfCmIWLVIpFNRWcl1qMpVpoztRqx/dl2mby4qQt9rijxI0U+CxANr6/ R4B9J0HK5XF4TBCDsW1T8oZA4g+ahsyzglM0WltsxX2zldBUVKkgS3ZWeDCNczn7pgKL 6GMQ== X-Gm-Message-State: ALKqPwc7x1smbTgRVL14pJFCtshhxThAE4uo2wmpEmeTTLJyfgLoWcOq GFyCN7zlej+NE2Pe8FV+9th/kA== X-Google-Smtp-Source: AB8JxZol0CeM2MUMhcgtOHNpOWO3FXrM6PL15zmk8X9QljNsb2tXPOumcL5MN0QHf7BCzGYxZlWG/Q== X-Received: by 2002:adf:8f25:: with SMTP id p34-v6mr768875wrb.193.1525947598005; Thu, 10 May 2018 03:19:58 -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.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 May 2018 03:19:57 -0700 (PDT) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: igt-dev@lists.freedesktop.org Date: Thu, 10 May 2018 11:19:21 +0100 Message-Id: <20180510101924.20814-6-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 6/9] 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 d92b338ba507..a10de11de01a 100755 --- a/scripts/trace.pl +++ b/scripts/trace.pl @@ -597,7 +597,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; @@ -614,7 +618,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) { @@ -949,7 +953,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'};