From patchwork Tue Jun 5 17:50:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 10448909 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 C786160375 for ; Tue, 5 Jun 2018 17:51:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B761E29B26 for ; Tue, 5 Jun 2018 17:51:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AC6DA29B2A; Tue, 5 Jun 2018 17:51:03 +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 7398029B26 for ; Tue, 5 Jun 2018 17:51:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A55616EEE3; Tue, 5 Jun 2018 17:51:01 +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 841926EEE3 for ; Tue, 5 Jun 2018 17:51:00 +0000 (UTC) Received: by mail-wr0-x244.google.com with SMTP id o12-v6so3340943wrm.12 for ; Tue, 05 Jun 2018 10:51:00 -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=cdb/WS/a+qdNP2mCdYtnUmvUIWL/BcnYWQThTHIR06s=; b=S38l1SyLvZL7v1tsp6PgosoUJL0mBNCIekZCSkCam0PgxjmVeXtKn5uiEyTD+Cdtqa qHTM/t15Bh93jp2kWmCNCyXTfzeoLq1mWclQ2/VmqrBY8kBTHHzxFdfEQFsd/gTllH8L jh8furCeza62Up5M5v3zcCeJ3NFMxyt9YmCfcxKEp24Fgiu5zLmbhL8jGVY/o0I2yoWP JwMpDutETWPsh1GszzhamzdTRhNJ8EGoLXLq7yrjr+q4nI/El0OpUx9D7q8Mo+MV05hI v2myU5LoCxxgAXTKvSiWq8gBQqrG1h+d/PGLwaXfsLoSCg+0gY97gGVHqZh4XraGgmO/ OEeg== X-Gm-Message-State: APt69E3Om2A5s7Sd/ZJhPo+l/wYropJt/EEoGrT38SSifXMO6nB4CbOh SffRY7hyxsNjB7jJr+CAIanMsA== X-Google-Smtp-Source: ADUXVKI68tmzvErxGC18mgM67w8VLc8P3izvhb7Vacqt9QgXFo+AZwdU7/CViH8hjJoBKkW8NLB4Eg== X-Received: by 2002:adf:b219:: with SMTP id u25-v6mr8011965wra.1.1528221059261; Tue, 05 Jun 2018 10:50:59 -0700 (PDT) Received: from localhost.localdomain ([95.146.151.144]) by smtp.gmail.com with ESMTPSA id u108-v6sm59739052wrc.40.2018.06.05.10.50.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Jun 2018 10:50:57 -0700 (PDT) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: igt-dev@lists.freedesktop.org Date: Tue, 5 Jun 2018 18:50:45 +0100 Message-Id: <20180605175050.29850-3-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180605175050.29850-1-tvrtko.ursulin@linux.intel.com> References: <20180605175050.29850-1-tvrtko.ursulin@linux.intel.com> Subject: [Intel-gfx] [PATCH i-g-t 3/8] 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 7d5c19ffd2e7..8f118d8665cf 100755 --- a/scripts/trace.pl +++ b/scripts/trace.pl @@ -603,7 +603,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'};