From patchwork Thu May 10 10:19:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 10391597 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 78B4660153 for ; Thu, 10 May 2018 10:20:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 687ED2890F for ; Thu, 10 May 2018 10:20:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5A923289CE; Thu, 10 May 2018 10:20:27 +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 132472890F for ; Thu, 10 May 2018 10:20:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2F7676EEEB; Thu, 10 May 2018 10:19:59 +0000 (UTC) X-Original-To: Intel-gfx@lists.freedesktop.org Delivered-To: Intel-gfx@lists.freedesktop.org Received: from mail-wr0-x244.google.com (mail-wr0-x244.google.com [IPv6:2a00:1450:400c:c0c::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id D36E36EEEA for ; Thu, 10 May 2018 10:19:57 +0000 (UTC) Received: by mail-wr0-x244.google.com with SMTP id v60-v6so1450628wrc.7 for ; Thu, 10 May 2018 03:19:57 -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=tvzOmdgKUULF/6sDy16R7CCTt3p2ShlOwGTpEYgNmdtfAEpJDgU1zCcgXKbLWmex9U SoaiLCwpN8ukcMjPcZljpwKSwvZewCaKINMDFGtOiEUskp7ulbBbF6DjxX+B8OfsdH1z 5FTdj+Fe0uj98MwsXCxBO/mkRI1lxP04nDMaEsfwfRg+ymeHps7ITXcE+Y9bLeGM+76G 1b2d4UrELUS+t8pTCiBedMjdIXH5fchihto5/gncR/qyesAJ5DKZ1M1+dHnkIv/HiVr1 N+IH65OxOoMzLKTy6HQoMxwmzaVD4LugjcoHpI9OxSWQzAMEDvU60jBvZyy8AB1190EL E+bg== 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=XYkV3J2f23ghOzbhQNinVh97OQju0fNHTZhPFut3DYwG3obPJIIrcQTKI5pROD9NF9 TcYzs54aqbhQneTDtvW2mM9voIv7fgpmUONeVfvw32mZeI1orFu8ozkfMsJ9il1UAvDU 11Cv+6hB9nPboRwPw5LW6TgkYK/FEyEp7xcyL33l+sXkgkLaUjUgQBXBWCm/GZo5NS7L 4PYH07Vgpc/eoljx4yHvGIxBI8K8x+dEr2YP6GrH4qFoMrRkx9camqVOQ4jWzlp6E4AR EdIq+dGsz+H+AnLBPGoTURBlhkntDaIUNPxoB9xHz6FRthnpTfJvVs6vl1VyUVRPUHCS CF/g== X-Gm-Message-State: ALKqPwerIZNPd35tjZ1tXMHI/UhuRWO3qlhI9WA6sT4Rf9ZBwHi4tpey c7dQ7T5eBAqNTd5qk6M+PbQwEw== X-Google-Smtp-Source: AB8JxZokwETLgcw2mHS+a7KBCBngOtmcjBOpI6Anxhi+qPr5GnCaN5/LCNjVKWvJMHSeBXIzUpB6TQ== X-Received: by 2002:adf:af65:: with SMTP id z92-v6mr810691wrc.250.1525947596574; Thu, 10 May 2018 03:19:56 -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.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 May 2018 03:19:53 -0700 (PDT) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: igt-dev@lists.freedesktop.org Date: Thu, 10 May 2018 11:19:19 +0100 Message-Id: <20180510101924.20814-4-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 4/9] 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'};