From patchwork Tue May 8 17:31:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 10386685 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 A04EB6037F for ; Tue, 8 May 2018 17:31:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E47628F83 for ; Tue, 8 May 2018 17:31:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8340128F98; Tue, 8 May 2018 17:31:50 +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 1285B28F83 for ; Tue, 8 May 2018 17:31:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 852276EB0F; Tue, 8 May 2018 17:31:46 +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 74ED26EAFC for ; Tue, 8 May 2018 17:31:44 +0000 (UTC) Received: by mail-wr0-x243.google.com with SMTP id i14-v6so29956498wre.2 for ; Tue, 08 May 2018 10:31:44 -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=OBckShWeNse/pNYdy52/d91/2q2J7fBHSC4dxlVUc/0=; b=epVU2d1IHTiv7wbjwwaB/vJc7x1TTW2IhsWkulYfB/Hl8U/lrX1HFyX90Hl9tFmFux nambsclwYJKD9Hp+4FtIDsHfnWDqFKUqoF841xFeE7iMFQUhugGGYXD5c0s8gCIB61Xk OPhS5Cbyec7/AXLd9zTaZtzswYHgz8xPt3veElhS4mSJvAkcCGPMoKfAnCAG1yk7rfF+ RTaBaOZoRjVl1W2wRSI0BYuMNPBd79h+oRtC83wqSkvbROFNPQ8U4R0I94n/GVgx2tnH z7Gn/76X9bFWFZfhTKP5bU4NT7VLNs4jTJ8oI69l/QKS1NFlk5BffWleR/XBrwFytzRz tzdg== 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=OBckShWeNse/pNYdy52/d91/2q2J7fBHSC4dxlVUc/0=; b=j/8xh9ABeyE0lqNz7YYnlNPVf9IPy39gv1XHHkVbi07J+cE3u49JavplLBoS707HI4 Ii8XChEh/yY0TWiR7GHu9e9sMvLetDyAKTEfc314v8WeGlMaSgfcesaO/E5hn+b4WwbE qlCit91uwIX/4SPGGitTzaoVDNVJJGiAU9tD2k6PP1AEjUjb6qr0zaPZ7pSZlyVjJNtR PGAaXSt5Z66WyWcBFcMvgmjG5M4gUR5h7stEP7OqXbbravA+uwmRi85VzNlNw4fz18Wl LERx1SfT5hSPku7FkiUXDo4wUMOiY7lIHMst/SoCevehkmMVM5NCdHo+tGjarCE9R/qT H1wg== X-Gm-Message-State: ALQs6tCUZCQn/BjS7WsZAaHxu7Dyf2eJDlNtxGlS5cL5k4yCOX13xpVe boAokZ4tXO/CThqhuESglZ84WA== X-Google-Smtp-Source: AB8JxZrVl0F7TLOiRDrjKeNavGLs/wRmi4e5Nl0e9+icbSokqNt7rP+RCSGikqRR2HUv88SSX2+yqA== X-Received: by 2002:adf:ba50:: with SMTP id t16-v6mr31927912wrg.237.1525800703210; Tue, 08 May 2018 10:31:43 -0700 (PDT) Received: from localhost.localdomain ([95.146.151.144]) by smtp.gmail.com with ESMTPSA id n4sm15373101wmg.29.2018.05.08.10.31.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 May 2018 10:31:42 -0700 (PDT) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: igt-dev@lists.freedesktop.org Date: Tue, 8 May 2018 18:31:12 +0100 Message-Id: <20180508173115.24550-4-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180508173115.24550-1-tvrtko.ursulin@linux.intel.com> References: <20180508173115.24550-1-tvrtko.ursulin@linux.intel.com> Subject: [Intel-gfx] [PATCH i-g-t 4/7] trace.pl: Fix engine busy accounting in split mode 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 In split mode all requests have to be added up since they were previously re-arranged so there is no overlap. Signed-off-by: Tvrtko Ursulin Cc: John Harrison --- scripts/trace.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/trace.pl b/scripts/trace.pl index fae94d5044ef..696c18e8b1cf 100755 --- a/scripts/trace.pl +++ b/scripts/trace.pl @@ -601,7 +601,8 @@ foreach my $key (@sorted_keys) { $db{$key}->{'submit-delay'} = $db{$key}->{'submit'} - $db{$key}->{'queue'}; $db{$key}->{'duration'} = $notify - $start; - $running{$ring} += $end - $start unless exists $db{$key}->{'no-end'}; + $running{$ring} += $end - $start if $correct_durations or + not exists $db{$key}->{'no-end'}; $runnable{$ring} += $db{$key}->{'execute-delay'}; $queued{$ring} += $start - $db{$key}->{'execute-delay'} - $db{$key}->{'queue'};