From patchwork Mon Jul 9 13:20:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 10514579 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 299EC6032C for ; Mon, 9 Jul 2018 13:20:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 16AFC2894E for ; Mon, 9 Jul 2018 13:20:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0B0F228B01; Mon, 9 Jul 2018 13:20:26 +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 BE28A2894E for ; Mon, 9 Jul 2018 13:20:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 18CA06E45F; Mon, 9 Jul 2018 13:20:22 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4EF236E2F2 for ; Mon, 9 Jul 2018 13:20:17 +0000 (UTC) Received: by mail-wr1-x442.google.com with SMTP id h10-v6so10957278wre.6 for ; Mon, 09 Jul 2018 06:20:17 -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=+HvThfq1MlG98EyfklM3kh6ox7lA/0Q+lkeVnhh65X0=; b=M98NCvikqO818TEkemPDOsTjEZVgBYNg3O9lP5qJkJ5CqOkRrRW3qHsXkrHEHdA++K 8PIxm3VUkocXxoGQMY6d1QcuPP8oiZAPhXSbQ2wgbVwFce01Qk6biG1KyGzztXNPvRj6 VDVzNGDRWixGmg9yRuszB3QPrJIRHN5FLtPd7uRaRxHVoMDXyhZVlVA4UjlhyyD/KCln UMe42gaYcVMECGDKxKB53XmzCgYJAasI1QP5MW/23nDFC9DTojpFW4MJNFErFQTtO3Sj EynFrB1vx6X9aTVEBrCG24JugUVjWfUMjwiJg8jr1l9qf0Qxoyc7+TcFgps2T9c34PFo WL2A== X-Gm-Message-State: APt69E2T/wmRsKtkxgmvRjvmHonmdka7Mc8+QHPbgOV5uqPsmprbtB/i 30x63eYwDnli1tAhHC4rmsb2zA== X-Google-Smtp-Source: AAOMgpdjSnXf8W8D+JXLBwbvJBAygw0HdEhBGptDm1mmN20ZT3jK28j6gyTli7ySmhstYiwfSeO5cQ== X-Received: by 2002:adf:a6e2:: with SMTP id t89-v6mr15982378wrc.231.1531142415738; Mon, 09 Jul 2018 06:20:15 -0700 (PDT) Received: from localhost.localdomain ([95.146.151.144]) by smtp.gmail.com with ESMTPSA id l10-v6sm21585637wrv.23.2018.07.09.06.20.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jul 2018 06:20:15 -0700 (PDT) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: igt-dev@lists.freedesktop.org Date: Mon, 9 Jul 2018 14:20:00 +0100 Message-Id: <20180709132004.14468-8-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180709132004.14468-1-tvrtko.ursulin@linux.intel.com> References: <20180709132004.14468-1-tvrtko.ursulin@linux.intel.com> Subject: [Intel-gfx] [PATCH i-g-t 07/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 Reviewed-by: John Harrison --- scripts/trace.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/trace.pl b/scripts/trace.pl index 60a8e441c1d9..52372e224da5 100755 --- a/scripts/trace.pl +++ b/scripts/trace.pl @@ -612,7 +612,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'};