From patchwork Tue Mar 6 12:43: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: 10261591 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 8370F6037E for ; Tue, 6 Mar 2018 12:43:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 702E328A57 for ; Tue, 6 Mar 2018 12:43:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6517128E43; Tue, 6 Mar 2018 12:43:44 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, 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 5FB4628A57 for ; Tue, 6 Mar 2018 12:43:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9E79E6E6CA; Tue, 6 Mar 2018 12:43:40 +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 860F06E6BC for ; Tue, 6 Mar 2018 12:43:33 +0000 (UTC) Received: by mail-wr0-x242.google.com with SMTP id m12so20757512wrm.13 for ; Tue, 06 Mar 2018 04:43:33 -0800 (PST) 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=zjDuR3lI18JPJ6zLHe+krdv6qD7wJ9Bmu/inD4rWfAw=; b=rcivoW/naBiaZBmosZ6knjzDVdYrJu0uwvhkKJBTxQ2HA1zDQxys7nsrVoouzxsln3 gju1CU5zRAMbjVfMpq7OSa5Ffpuht51Vxmezs7tMniX8v8kCUdHPdrAoO2NLrMFEg5Ba IfSsxH2Y1CnExPnd/+NQ/5XS4zO1pnXNtmcpxALeJ2s8BLa/o1WoiX4eQd/FEVZoiZiD L+O+SsxDTig1vY9w/CQ5QLq9fSgAlipqdHq+UUxDPDT6pI+MkSv7sOWJJtKhRuUJaXZv HmM1DToIKFrDEy+vsl7ljlNExw7hk5i3iUK2CVturUD1CSPU4FkqecNbsIwiDBkLOj0b 761g== 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=zjDuR3lI18JPJ6zLHe+krdv6qD7wJ9Bmu/inD4rWfAw=; b=gVRF2ddqUvFUmEw8yPkr1Yvacg/U/dtekqXZT6aqk8ODb1N++fHzjd7i+OVhkJ1O0B 2Ic0ThiP4laktcOqcGJRdA/ykQyQ3mpvEYxiMu87mbAnJxCLxA1qtCxUJA2Y0NpGcMvw 5yNY9EqRmlyEnn33VNbC+QJ8PYguYlP0BZAOIKQYonDKuSCRXlMfSvZKFL5RAWRlx4xe svkmeqDVpLVL/Snj7aW+vv06F7mvNElTgt7Ls4W5HOGQ+0IwHWo04I0JaYhPbSkPY5zX 5bE4TMcPc1bTAZg5hTSdcTuG3ssUh/E+zapNHo+BkUiC2U29PDzAeJsEnOYiSbI+BQzj npAA== X-Gm-Message-State: APf1xPDayo3MKe5NqgA5hwNJzAaKEqqC5jJ0AoOyu00cu62sI/XBUvIZ edmIgxjbrEIg7A7o9C5rF1abQhGw X-Google-Smtp-Source: AG47ELt1sO3bHXkDadgqSmZsEir3viLQL5d41fECDL0FR9z52TeK0FYHCFJdVQQbie49v/51YjmSag== X-Received: by 10.223.173.18 with SMTP id p18mr16923213wrc.29.1520340212209; Tue, 06 Mar 2018 04:43:32 -0800 (PST) Received: from localhost.localdomain ([95.146.144.186]) by smtp.gmail.com with ESMTPSA id v8sm3646560wmh.25.2018.03.06.04.43.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Mar 2018 04:43:31 -0800 (PST) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: igt-dev@lists.freedesktop.org Date: Tue, 6 Mar 2018 12:43:12 +0000 Message-Id: <20180306124315.30208-9-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180306124315.30208-1-tvrtko.ursulin@linux.intel.com> References: <20180306124315.30208-1-tvrtko.ursulin@linux.intel.com> Subject: [Intel-gfx] [PATCH i-g-t 08/11] 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 27b39efcebbd..e7ce273ef26a 100755 --- a/scripts/trace.pl +++ b/scripts/trace.pl @@ -596,7 +596,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'};