From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Kamil Konieczny <kamil.konieczny@linux.intel.com>,
igt-dev@lists.freedesktop.org, Intel-gfx@lists.freedesktop.org,
Caleb Callaway <caleb.callaway@intel.com>
Subject: Re: [igt-dev] [Intel-gfx] [PATCH i-g-t 1/3] intel_gpu_top: Do not repeat header lines in non-interactive output
Date: Thu, 9 Feb 2023 08:24:56 +0000 [thread overview]
Message-ID: <2825c998-3e11-ccc0-0e0a-ebb874d569fb@linux.intel.com> (raw)
In-Reply-To: <20230208123142.zudgou6bjt7qbin4@kamilkon-desk1>
On 08/02/2023 12:31, Kamil Konieczny wrote:
> Hi Tvrtko,
>
> one small nit, see below.
>
> On 2023-02-03 at 11:16:34 +0000, Tvrtko Ursulin wrote:
>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>
>> If output is redirected to a file, or a pipe, lets not repeat the headers
>> because that can usually mean user is trying to parse the data later and
>> so repeated headers are a hindrance.
>>
>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>> Cc: Caleb Callaway <caleb.callaway@intel.com>
>> ---
>> tools/intel_gpu_top.c | 19 ++++++++++++++-----
>> 1 file changed, 14 insertions(+), 5 deletions(-)
>>
>> diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
>> index 0a1de41b3374..e2a7f4753099 100644
>> --- a/tools/intel_gpu_top.c
>> +++ b/tools/intel_gpu_top.c
>> @@ -1391,6 +1391,7 @@ static unsigned int stdout_level;
>>
>> #define STDOUT_HEADER_REPEAT 20
>> static unsigned int stdout_lines = STDOUT_HEADER_REPEAT;
>> +static bool stdout_header_repeat;
>>
>> static void
>> stdout_open_struct(const char *name)
>> @@ -1580,16 +1581,22 @@ static const struct print_operations term_pops = {
>>
>> static bool print_groups(struct cnt_group **groups)
>> {
>> - unsigned int headers = stdout_lines % STDOUT_HEADER_REPEAT + 1;
>> + static bool headers_printed = false;
> ----------------------------------- ^
> Remove this initialization (use checkpatch from Linux kernel).
>
> Please correct and resend (you can keep my r-b).
Fixed and pushed, thanks for the review!
Regards,
Tvrtko
next prev parent reply other threads:[~2023-02-09 8:24 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-03 11:16 [igt-dev] [PATCH i-g-t 0/3] More intel_gpu_top improvements Tvrtko Ursulin
2023-02-03 11:16 ` [igt-dev] [PATCH i-g-t 1/3] intel_gpu_top: Do not repeat header lines in non-interactive output Tvrtko Ursulin
2023-02-07 13:25 ` [igt-dev] [Intel-gfx] " Kamil Konieczny
2023-02-08 12:31 ` Kamil Konieczny
2023-02-09 8:24 ` Tvrtko Ursulin [this message]
2023-02-03 11:16 ` [igt-dev] [PATCH i-g-t 2/3] intel_gpu_top: Rename STDOUT to TEXT Tvrtko Ursulin
2023-02-07 13:15 ` Kamil Konieczny
2023-02-03 11:16 ` [igt-dev] [PATCH i-g-t 3/3] intel_gpu_top: Add CVS output format Tvrtko Ursulin
2023-02-03 11:22 ` Ville Syrjälä
2023-02-03 11:27 ` Tvrtko Ursulin
2023-02-03 11:30 ` [igt-dev] [PATCH i-g-t 3/3] intel_gpu_top: Add CSV " Tvrtko Ursulin
2023-02-03 11:31 ` Tvrtko Ursulin
2023-02-07 13:29 ` [igt-dev] [Intel-gfx] " Kamil Konieczny
2023-02-03 14:49 ` [igt-dev] ✓ Fi.CI.BAT: success for More intel_gpu_top improvements (rev3) Patchwork
2023-02-04 17:27 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2825c998-3e11-ccc0-0e0a-ebb874d569fb@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=Intel-gfx@lists.freedesktop.org \
--cc=caleb.callaway@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kamil.konieczny@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox