From patchwork Mon Jul 9 13:19:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 10514569 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 39C166032A for ; Mon, 9 Jul 2018 13:20:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 25A262894E for ; Mon, 9 Jul 2018 13:20:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1A2B328B01; Mon, 9 Jul 2018 13:20:19 +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 D05902894E for ; Mon, 9 Jul 2018 13:20:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B6F8A6E2AE; Mon, 9 Jul 2018 13:20:15 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by gabe.freedesktop.org (Postfix) with ESMTPS id CED1C6E1EF for ; Mon, 9 Jul 2018 13:20:13 +0000 (UTC) Received: by mail-wr1-x430.google.com with SMTP id b15-v6so10975382wrv.10 for ; Mon, 09 Jul 2018 06:20:13 -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=VuyzT7PvJD1SmHHlYwCdouRd3fvbxq+x6mgsXzIgRrI=; b=Nbsr67U3w0nOwrDbWGtfWbnOvEFb1fLGu2gIorUPGCNUaUQPp7xFGEZoJpo3Uv6fpM fgo+3uctXH5mXf17Q4uU6TvCdx2kX3Zxbx94vznYDPSLKyY0Ccwj7/jUTCqrkvxGZn25 t8XF2C8U25MSOZqb7w5C+KjUqEBa97Gzn7L/1XhlY/7BYn56kc3wROxMinqZteLPeXbH 2pJRfNUNHe5PIor2Nyd0+LpH9+LiJmSwksYTPMVw1xyw5uXPklSxWQJVcSbwIkuBr2Cc O8f9NKEbOgcxKG9nzM5GHUXCWBmHLFMImF7jtfub7kmSOQYY15WD5GIFdLq9XTjVbheQ JWtg== X-Gm-Message-State: APt69E3pAqp2vw7WNFjXxMitYpGECiJlGGEdYlYfj9/1e519F2m2N2sM NR5UUFHlgaPbrj5FwU9fRXDTJQ== X-Google-Smtp-Source: AAOMgpcI8WTNpf9DOA4z7Q2hLvSvbFlDIEcZ0q9BkjsP3V78PiwnRW4NTgfkvfU3rFfoxzVcxwzXyw== X-Received: by 2002:a5d:4701:: with SMTP id y1-v6mr14316100wrq.107.1531142412467; Mon, 09 Jul 2018 06:20:12 -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.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jul 2018 06:20:12 -0700 (PDT) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: igt-dev@lists.freedesktop.org Date: Mon, 9 Jul 2018 14:19:56 +0100 Message-Id: <20180709132004.14468-4-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 03/11] trace.pl: Scale timeline for better precision 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 vis library has a limited precision compared to our trace data which prevents zooming into the timeline and seeing the fine detail. Scale the HTML view by a thousand to work around it. Signed-off-by: Tvrtko Ursulin Suggested-by: John Harrison Cc: John Harrison Reviewed-by: John Harrison --- scripts/trace.pl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/scripts/trace.pl b/scripts/trace.pl index 1ec8b297d15e..4d3e06434f05 100755 --- a/scripts/trace.pl +++ b/scripts/trace.pl @@ -40,6 +40,7 @@ my $trace = 0; my $avg_delay_stats = 0; my $gpu_timeline = 0; my $colour_contexts = 0; +my $no_timeline_scaling = 0; my @args; @@ -281,6 +282,18 @@ sub arg_colour_contexts return @_; } +sub arg_no_timeline_scaling +{ + return unless scalar(@_); + + if ($_[0] eq '--no-timeline-scaling') { + shift @_; + $no_timeline_scaling = 1; + } + + return @_; +} + @args = @ARGV; while (@args) { my $left = scalar(@args); @@ -296,6 +309,7 @@ while (@args) { @args = arg_ignore_ring(@args); @args = arg_skip_box(@args); @args = arg_colour_contexts(@args); + @args = arg_no_timeline_scaling(@args); last if $left == scalar(@args); } @@ -334,6 +348,8 @@ sub ts my ($us) = @_; my ($d, $h, $m, $s); + $us *= 1000 unless $no_timeline_scaling; + $s = int($us / 1000000); $us = $us % 1000000;