From patchwork Wed Jul 11 22:07:12 2018
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: John Harrison
X-Patchwork-Id: 10520643
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
C5D48605DC for ;
Wed, 11 Jul 2018 22:07:21 +0000 (UTC)
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A95E529877
for ;
Wed, 11 Jul 2018 22:07:21 +0000 (UTC)
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
id 9B66F2989C; Wed, 11 Jul 2018 22:07:21 +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 A8B2129877
for ;
Wed, 11 Jul 2018 22:07:20 +0000 (UTC)
Received: from gabe.freedesktop.org (localhost [127.0.0.1])
by gabe.freedesktop.org (Postfix) with ESMTP id 001596EE28;
Wed, 11 Jul 2018 22:07:19 +0000 (UTC)
X-Original-To: intel-gfx@lists.freedesktop.org
Delivered-To: intel-gfx@lists.freedesktop.org
Received: from mga05.intel.com (mga05.intel.com [192.55.52.43])
by gabe.freedesktop.org (Postfix) with ESMTPS id 72D4A6EE1D;
Wed, 11 Jul 2018 22:07:18 +0000 (UTC)
X-Amp-Result: UNKNOWN
X-Amp-Original-Verdict: FILE UNKNOWN
X-Amp-File-Uploaded: False
Received: from orsmga001.jf.intel.com ([10.7.209.18])
by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
11 Jul 2018 15:07:17 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos; i="5.51,339,1526367600"; d="scan'208,223";
a="71999644"
Received: from johnharr-mobl3.ger.corp.intel.com (HELO [10.255.75.4])
([10.255.75.4])
by orsmga001.jf.intel.com with ESMTP; 11 Jul 2018 15:07:13 -0700
To: Tvrtko Ursulin , igt-dev@lists.freedesktop.org
References: <20180709132004.14468-1-tvrtko.ursulin@linux.intel.com>
<20180709132004.14468-3-tvrtko.ursulin@linux.intel.com>
From: John Harrison
Message-ID: <2977b001-a780-e19e-60e6-53c3c4744f54@Intel.com>
Date: Wed, 11 Jul 2018 15:07:12 -0700
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101
Thunderbird/52.9.1
MIME-Version: 1.0
In-Reply-To: <20180709132004.14468-3-tvrtko.ursulin@linux.intel.com>
Content-Language: en-US
Subject: Re: [Intel-gfx] [PATCH i-g-t 02/11] trace.pl: Improve readability
of graphical timeline representation
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
Errors-To: intel-gfx-bounces@lists.freedesktop.org
Sender: "Intel-gfx"
X-Virus-Scanned: ClamAV using ClamSMTP
On 7/9/2018 6:19 AM, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin
>
> We add stripes for different stages of request execution so it is easier
> to follow one context in the multi-colour mode.
>
> Vertical stripe pattern indicates pipeline "blockages" - requests waiting
> for dependencies before they are runnable.
>
> Diagonal stripes indicate runnable requests waiting for GPU time.
>
> Horizontal strips are requests executing on the GPU.
>
> Also use this new multi-coloured mode from media-bench.pl.
>
> v2:
> John Harrison:
> * Mention media-bench.pl in the commit.
> * Fix HTML for single colour mode.
>
> v3:
> * Rebase.
> * Apply stripes to legacy colouring as well.
>
> v4:
> John Harrison:
> * Use per context colours for ctxsave and incomplete boxes.
> * Clearer timeline legend.
>
> Signed-off-by: Tvrtko Ursulin
> Cc: John Harrison
> ---
> scripts/media-bench.pl | 2 +-
> scripts/trace.pl | 112 ++++++++++++++++++++++++++++++++---------
> 2 files changed, 90 insertions(+), 24 deletions(-)
>
> diff --git a/scripts/media-bench.pl b/scripts/media-bench.pl
> index c5628c7f2836..375844d9cdf6 100755
> --- a/scripts/media-bench.pl
> +++ b/scripts/media-bench.pl
> @@ -207,7 +207,7 @@ sub trace_workload
> show_cmd($cmd);
> system($cmd);
>
> - $cmd = "perf script | $tracepl --html -x ctxsave -s ";
> + $cmd = "perf script | $tracepl --html -x ctxsave -s -c ";
> $cmd .= join ' ', map("-i $_", @skip_engine);
> $cmd .= " > ${file}.html";
> show_cmd($cmd);
> diff --git a/scripts/trace.pl b/scripts/trace.pl
> index fd414f5a4b1e..1ec8b297d15e 100755
> --- a/scripts/trace.pl
> +++ b/scripts/trace.pl
> @@ -727,9 +727,14 @@ foreach my $key (keys %reqwait) {
> say sprintf('GPU: %.2f%% idle, %.2f%% busy',
> $flat_busy{'gpu-idle'}, $flat_busy{'gpu-busy'}) unless $html;
>
> -my $queued_colour = $colour_contexts ? 'multi-colour light' : 'blue';
> -my $runnable_colour = $colour_contexts ? 'multi-colour dark' : 'grey';
> -my $execute_colour = $colour_contexts ? 'multi-colour' : 'pink';
> +my $timeline_text = $colour_contexts ?
> + 'Per context coloured shading like:' : 'Box shading like:';
> +
> +my $queued_style = box_style($min_ctx, 'queue');
> +my $ready_style = box_style($min_ctx, 'ready');
> +my $execute_style = box_style($min_ctx, 'execute');
> +my $ctxsave_style = box_style($min_ctx, 'ctxsave');
> +my $incomplete_style = box_style($min_ctx, 'incomplete');
In context colouring mode, the legend is not especially useful as it is
only coloured for one particular context (which at least for all of my
traces, is the system context that only appears at the very end as a
flush) and has no indication that other contexts will be significantly
different. Also, I find the black text is really hard to read against
the dark colour backgrounds. Plus the boxes are too small to actually
work out what the shading is (for 'ready' and 'incomplete' if not all of
them).
See attached patch for some tweaks. Basically, add all contexts to the
key in colour mode, make the boxes bigger and use white text for most of
it. Although the thought occurs that it might be worth limiting the
legend to only four or five contexts and just putting an 'etc' at the
end if there are more. Otherwise a trace with hundreds of contexts could
be a problem! I'm guessing in that case, the difference in colour from
one context to the next will be pretty minimal anyway.
>
> print <
> @@ -751,9 +756,28 @@ print <
>
>
> -$execute_colour = requests executing on the GPU
> -$runnable_colour = runnable requests waiting for a slot on GPU
> -$queued_colour = requests waiting on fences and dependencies before they are runnable
> +Timeline request view:
> +
> +
$timeline_text
> +
> +
QUEUED
> +
READY
> +
EXECUTE
> +
CTXSAVE
> +
> +
> +
> +
(INCOMPLETE)
> +
> +
> +
> +
> +
> +QUEUED = requests executing on the GPU
> +READY = runnable requests waiting for a slot on GPU
> +EXECUTE = requests waiting on fences and dependencies before they are runnable
> +CTXSAVE = GPU saving the context image
> +
>
-QUEUED = requests executing on the GPU
+QUEUE = requests executing on the GPU
READY = runnable requests waiting for a slot on GPU
EXECUTE = requests waiting on fences and dependencies before they are runnable
CTXSAVE = GPU saving the context image
+INCOMPLETE = request has stopped executing but is not yet complete (e.g. it was pre-empted)