From patchwork Mon Apr 23 09:52:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 10356525 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 9208A60225 for ; Mon, 23 Apr 2018 09:53:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 83EFF28A03 for ; Mon, 23 Apr 2018 09:53:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 789D028A07; Mon, 23 Apr 2018 09:53:12 +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 370A328A03 for ; Mon, 23 Apr 2018 09:53:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 93AB86E193; Mon, 23 Apr 2018 09:53:11 +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 063236E193 for ; Mon, 23 Apr 2018 09:53:08 +0000 (UTC) Received: by mail-wr0-x243.google.com with SMTP id p5-v6so11642998wre.12 for ; Mon, 23 Apr 2018 02:53:08 -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=dwn5Jy01/UjSfuQLnp+UC9tcvi30RwGSn5cxJBmBPkQ=; b=Lg+OH9Xnbnc+qMpWLG+JRhzK7fnrmXSdUITIfc6OPGErokjMYaVm7oqO2o8eFX/XQ7 l0WTnjQbjldGa2QoqqH7IrVvd/AHpS4reNAQPwKOz+/eT0gR1FGYW4pNR0myDnsR0fu+ 8hDR9+IW6hubmtkni4rVaZSORJ+SAmeEj2g1CYRdAFMhsdhe9msFvPAmotKyS9Lp88A/ mvxkfmYaA8PkLQ3uxVXg7np++UPvcKbTUnjSlIaV/maa9ekc9ZB9EO5EP26zGsc44Po1 HSrrz7OdO5QWszUjJVO9vewXFL5Quh3dS5IUviRZezdFmCMMvbHt+jCcTNmycplJCmBt XBUw== 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=dwn5Jy01/UjSfuQLnp+UC9tcvi30RwGSn5cxJBmBPkQ=; b=ZlKhetdAgNL19QAKht6ojQnIQObI6NE5HWToWUcF2ie9zJVIssGKQmVz8vPWBh5pFV sggVpcxg8u/BuoJ1WI+tYLjeE+FovK/kKLNq9/QKo3M2umT3x2XoGa7/GLbHkeBlE1/D kbNSkuNR6QxD1hZobKwT8zoSJHifgV97BcRwd+BR8egh7kTbNCzXpouiZT9YtDfmp6X+ EicNCaZTY87jw1bicxLYg+ThT3nJeajfVBcxeSRr6jpjvHCLpbqXUOQ1WCjiQJlsRhn5 yZzKLcTqFL2yB3K4kj+ruVQDG/yuts2EaPZUMM02O3sEV5qfjZ1JsEpUODAfTdMBRMgo F+vw== X-Gm-Message-State: ALQs6tDXGivzzQ4maz7fUW0p7PBkN//QNWmaBVO/l3WPcLjS5b7VM8j6 EcIQBCYTt0yC+pDCL2b3IgPceA== X-Google-Smtp-Source: AIpwx4+0UtgIu3BUt29UtPICmz2jZnVs8r2WpvZcF56R4qKNssWIQpLjrEhP9386IUN0AegQdPWXRw== X-Received: by 2002:adf:876f:: with SMTP id 44-v6mr15410283wrz.117.1524477187582; Mon, 23 Apr 2018 02:53:07 -0700 (PDT) Received: from localhost.localdomain ([95.146.151.144]) by smtp.gmail.com with ESMTPSA id j76sm20918590wmf.33.2018.04.23.02.53.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Apr 2018 02:53:07 -0700 (PDT) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: igt-dev@lists.freedesktop.org Date: Mon, 23 Apr 2018 10:52:36 +0100 Message-Id: <20180423095238.29238-3-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180423095238.29238-1-tvrtko.ursulin@linux.intel.com> References: <20180423095238.29238-1-tvrtko.ursulin@linux.intel.com> Subject: [Intel-gfx] [PATCH i-g-t 2/4] 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 c8182a8ea86d..eb5a36b91a5c 100755 --- a/scripts/trace.pl +++ b/scripts/trace.pl @@ -619,7 +619,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'};