From patchwork Thu Jul 12 10:59:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 10521467 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 AAD0D6032C for ; Thu, 12 Jul 2018 11:00:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 956CA2925C for ; Thu, 12 Jul 2018 11:00:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 89B8329271; Thu, 12 Jul 2018 11:00:20 +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 4A2E22925C for ; Thu, 12 Jul 2018 11:00:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BE41A6EF4F; Thu, 12 Jul 2018 11:00:19 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id BA4A26EF6B for ; Thu, 12 Jul 2018 11:00:10 +0000 (UTC) Received: by mail-wm0-x241.google.com with SMTP id z6-v6so1790809wma.0 for ; Thu, 12 Jul 2018 04:00:10 -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=rRSesXgghFkaEbmZE6TfBXSoD/nbmBzgcB05DAJVE9w=; b=ORX1Wevoq6AyLOtIoE0KP8pY6gspGLZ8F3WdcogOuwU1XU3ciDgkU1lPPdENAixsTG fqjLVIT8lFQr7Yb9Qnp4qhKvmAlIG8IP+gCceX+1ac4ZSGapWNPsNGL5pmcxRZA+Bu/S PaSeQdqfLmfTZcabkWmhJmw+VIknwbIBjeTLNgWG3QZIQ/AENUjVzBYCpTGfWdvIApMs jDB8pbcgAJOFUpbjkShiO6rnyktUETHTI+jPqx2+5LIehWPgEzVl/S5JewufbR9R2zwn XSfJzY4DmMFKWmLjmXgJQYmbTatmi3HMdtlkM6WRufLL22o7YlFfMXKigYdOdKJBwtlV hgeA== X-Gm-Message-State: AOUpUlFPPMOUNB3IQx59LXPsvz5J7W2hxo0fu35vODCfjm9QSBgTrw5W fzk+Ehd+k1VVptiol9lZu6NcXg== X-Google-Smtp-Source: AAOMgpcZr69lgFutmHw71AuKd4fa7a5mTukaP/LfREeTTZnpLnQ6dsc4J4gZUPFOvpRXxX/Isc0s5Q== X-Received: by 2002:a1c:8a0f:: with SMTP id m15-v6mr1084775wmd.33.1531393209289; Thu, 12 Jul 2018 04:00:09 -0700 (PDT) Received: from localhost.localdomain ([95.146.151.144]) by smtp.gmail.com with ESMTPSA id z5-v6sm23494585wrv.2.2018.07.12.04.00.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jul 2018 04:00:08 -0700 (PDT) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: igt-dev@lists.freedesktop.org Date: Thu, 12 Jul 2018 11:59:55 +0100 Message-Id: <20180712105958.12953-7-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180712105958.12953-1-tvrtko.ursulin@linux.intel.com> References: <20180712105958.12953-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 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/trace.pl b/scripts/trace.pl index bd3039511f5d..9bdafa2d7e99 100755 --- a/scripts/trace.pl +++ b/scripts/trace.pl @@ -607,7 +607,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; @@ -624,7 +628,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) { @@ -1062,7 +1066,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'};